svelte-parse
Version:
An increidbly relaxed svelte-parser
345 lines (344 loc) • 6.18 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n import Pagination from '@sveltekit/ui/Pagination';\n\n let current = 1;\n let pageSize = 10;\n let total = 100;\n let canNavigate = true;\n let showSummary = true;\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 9,
"column": 1,
"offset": 174
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 9,
"column": 10,
"offset": 183
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 9,
"column": 10,
"offset": 183
},
"end": {
"line": 11,
"column": 1,
"offset": 185
}
}
},
{
"type": "svelteComponent",
"tagName": "Pagination",
"properties": [
{
"type": "svelteProperty",
"name": "current",
"value": [
{
"type": "svelteDynamicContent",
"expression": {
"type": "svelteExpression",
"value": "current",
"position": {
"start": {
"line": 11,
"column": 14,
"offset": 198
},
"end": {
"line": 11,
"column": 21,
"offset": 205
}
}
},
"position": {
"start": {
"line": 11,
"column": 13,
"offset": 197
},
"end": {
"line": 11,
"column": 21,
"offset": 205
}
}
}
],
"modifiers": [],
"shorthand": "expression",
"position": {
"start": {
"line": 11,
"column": 13,
"offset": 197
},
"end": {
"line": 11,
"column": 21,
"offset": 205
}
}
},
{
"type": "svelteProperty",
"name": "pageSize",
"value": [
{
"type": "svelteDynamicContent",
"expression": {
"type": "svelteExpression",
"value": "pageSize",
"position": {
"start": {
"line": 11,
"column": 24,
"offset": 208
},
"end": {
"line": 11,
"column": 32,
"offset": 216
}
}
},
"position": {
"start": {
"line": 11,
"column": 23,
"offset": 207
},
"end": {
"line": 11,
"column": 32,
"offset": 216
}
}
}
],
"modifiers": [],
"shorthand": "expression",
"position": {
"start": {
"line": 11,
"column": 23,
"offset": 207
},
"end": {
"line": 11,
"column": 32,
"offset": 216
}
}
},
{
"type": "svelteProperty",
"name": "total",
"value": [
{
"type": "svelteDynamicContent",
"expression": {
"type": "svelteExpression",
"value": "total",
"position": {
"start": {
"line": 11,
"column": 35,
"offset": 219
},
"end": {
"line": 11,
"column": 40,
"offset": 224
}
}
},
"position": {
"start": {
"line": 11,
"column": 34,
"offset": 218
},
"end": {
"line": 11,
"column": 40,
"offset": 224
}
}
}
],
"modifiers": [],
"shorthand": "expression",
"position": {
"start": {
"line": 11,
"column": 34,
"offset": 218
},
"end": {
"line": 11,
"column": 40,
"offset": 224
}
}
},
{
"type": "svelteProperty",
"name": "canNavigate",
"value": [
{
"type": "svelteDynamicContent",
"expression": {
"type": "svelteExpression",
"value": "canNavigate",
"position": {
"start": {
"line": 11,
"column": 43,
"offset": 227
},
"end": {
"line": 11,
"column": 54,
"offset": 238
}
}
},
"position": {
"start": {
"line": 11,
"column": 42,
"offset": 226
},
"end": {
"line": 11,
"column": 54,
"offset": 238
}
}
}
],
"modifiers": [],
"shorthand": "expression",
"position": {
"start": {
"line": 11,
"column": 42,
"offset": 226
},
"end": {
"line": 11,
"column": 54,
"offset": 238
}
}
},
{
"type": "svelteProperty",
"name": "showSummary",
"value": [
{
"type": "svelteDynamicContent",
"expression": {
"type": "svelteExpression",
"value": "showSummary",
"position": {
"start": {
"line": 11,
"column": 57,
"offset": 241
},
"end": {
"line": 11,
"column": 68,
"offset": 252
}
}
},
"position": {
"start": {
"line": 11,
"column": 56,
"offset": 240
},
"end": {
"line": 11,
"column": 68,
"offset": 252
}
}
}
],
"modifiers": [],
"shorthand": "expression",
"position": {
"start": {
"line": 11,
"column": 56,
"offset": 240
},
"end": {
"line": 11,
"column": 68,
"offset": 252
}
}
}
],
"selfClosing": false,
"children": [],
"position": {
"start": {
"line": 11,
"column": 1,
"offset": 185
},
"end": {
"line": 11,
"column": 83,
"offset": 267
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 11,
"column": 83,
"offset": 267
}
}
}