svelte-parse
Version:
An increidbly relaxed svelte-parser
169 lines (168 loc) • 2.67 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteElement",
"tagName": "div",
"properties": [
{
"type": "svelteProperty",
"name": "class",
"value": [
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 2,
"column": 12,
"offset": 16
},
"end": {
"line": 2,
"column": 18,
"offset": 22
}
},
"expression": {
"type": "svelteExpression",
"value": "size",
"position": {
"start": {
"line": 2,
"column": 13,
"offset": 17
},
"end": {
"line": 2,
"column": 17,
"offset": 21
}
}
}
},
{
"type": "text",
"value": " ",
"position": {
"start": {
"line": 2,
"column": 18,
"offset": 22
},
"end": {}
}
},
{
"type": "text",
"value": "line",
"position": {
"start": {
"line": 2,
"column": 19,
"offset": 23
},
"end": {
"line": 2,
"column": 24,
"offset": 28
}
}
}
],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 2,
"column": 5,
"offset": 9
},
"end": {
"line": 2,
"column": 24,
"offset": 28
}
}
}
],
"selfClosing": false,
"children": [],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 8,
"offset": 36
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 3,
"column": 8,
"offset": 36
},
"end": {
"line": 5,
"column": 1,
"offset": 38
}
}
},
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n export let size = ''\n",
"position": {
"start": {
"line": 5,
"column": 9,
"offset": 46
},
"end": {
"line": 7,
"column": 1,
"offset": 72
}
}
}
],
"position": {
"start": {
"line": 5,
"column": 1,
"offset": 38
},
"end": {
"line": 7,
"column": 10,
"offset": 81
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 7,
"column": 10,
"offset": 81
}
}
}