svelte-parse
Version:
An increidbly relaxed svelte-parser
141 lines (140 loc) • 2.35 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n\timport Info from './Info.svelte';\n\n\tconst pkg = {\n\t\tname: 'svelte',\n\t\tversion: 3,\n\t\tspeed: 'blazing',\n\t\twebsite: 'https://svelte.dev'\n\t};\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 10,
"column": 1,
"offset": 148
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 10,
"column": 10,
"offset": 157
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 10,
"column": 10,
"offset": 157
},
"end": {
"line": 12,
"column": 1,
"offset": 159
}
}
},
{
"type": "svelteComponent",
"tagName": "Info",
"properties": [
{
"type": "svelteProperty",
"name": "...pkg",
"value": [
{
"type": "svelteDynamicContent",
"expression": {
"type": "svelteExpression",
"value": "...pkg",
"position": {
"start": {
"line": 12,
"column": 8,
"offset": 166
},
"end": {
"line": 12,
"column": 14,
"offset": 172
}
}
},
"position": {
"start": {
"line": 12,
"column": 7,
"offset": 165
},
"end": {
"line": 12,
"column": 14,
"offset": 172
}
}
}
],
"modifiers": [],
"shorthand": "expression",
"position": {
"start": {
"line": 12,
"column": 7,
"offset": 165
},
"end": {
"line": 12,
"column": 14,
"offset": 172
}
}
}
],
"selfClosing": true,
"children": [],
"position": {
"start": {
"line": 12,
"column": 1,
"offset": 159
},
"end": {
"line": 12,
"column": 17,
"offset": 175
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 12,
"column": 17,
"offset": 175
}
}
}