svelte-parse
Version:
An increidbly relaxed svelte-parser
242 lines (241 loc) • 3.79 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n\timport { count } from './stores.js';\n\timport Incrementer from './Incrementer.svelte';\n\timport Decrementer from './Decrementer.svelte';\n\timport Resetter from './Resetter.svelte';\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 6,
"column": 1,
"offset": 188
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 6,
"column": 10,
"offset": 197
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 6,
"column": 10,
"offset": 197
},
"end": {
"line": 8,
"column": 1,
"offset": 199
}
}
},
{
"type": "svelteElement",
"tagName": "h1",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "The count is ",
"position": {
"start": {
"line": 8,
"column": 5,
"offset": 203
},
"end": {
"line": 8,
"column": 18,
"offset": 216
}
}
},
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 8,
"column": 18,
"offset": 216
},
"end": {
"line": 8,
"column": 26,
"offset": 224
}
},
"expression": {
"type": "svelteExpression",
"value": "$count",
"position": {
"start": {
"line": 8,
"column": 19,
"offset": 217
},
"end": {
"line": 8,
"column": 25,
"offset": 223
}
}
}
}
],
"position": {
"start": {
"line": 8,
"column": 1,
"offset": 199
},
"end": {
"line": 8,
"column": 31,
"offset": 229
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 8,
"column": 31,
"offset": 229
},
"end": {
"line": 10,
"column": 1,
"offset": 231
}
}
},
{
"type": "svelteComponent",
"tagName": "Incrementer",
"properties": [],
"selfClosing": true,
"children": [],
"position": {
"start": {
"line": 10,
"column": 1,
"offset": 231
},
"end": {
"line": 10,
"column": 15,
"offset": 245
}
}
},
{
"type": "text",
"value": "\n",
"position": {
"start": {
"line": 10,
"column": 15,
"offset": 245
},
"end": {
"line": 11,
"column": 1,
"offset": 246
}
}
},
{
"type": "svelteComponent",
"tagName": "Decrementer",
"properties": [],
"selfClosing": true,
"children": [],
"position": {
"start": {
"line": 11,
"column": 1,
"offset": 246
},
"end": {
"line": 11,
"column": 15,
"offset": 260
}
}
},
{
"type": "text",
"value": "\n",
"position": {
"start": {
"line": 11,
"column": 15,
"offset": 260
},
"end": {
"line": 12,
"column": 1,
"offset": 261
}
}
},
{
"type": "svelteComponent",
"tagName": "Resetter",
"properties": [],
"selfClosing": true,
"children": [],
"position": {
"start": {
"line": 12,
"column": 1,
"offset": 261
},
"end": {
"line": 12,
"column": 12,
"offset": 272
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 12,
"column": 12,
"offset": 272
}
}
}