svelte-parse
Version:
An increidbly relaxed svelte-parser
110 lines (109 loc) • 1.6 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n\tlet foo;\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 3,
"column": 1,
"offset": 19
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 10,
"offset": 28
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 3,
"column": 10,
"offset": 28
},
"end": {
"line": 5,
"column": 1,
"offset": 30
}
}
},
{
"type": "svelteComponent",
"tagName": "Widget",
"properties": [
{
"type": "svelteDirective",
"name": "bind",
"value": [],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 5,
"column": 9,
"offset": 38
},
"end": {
"line": 5,
"column": 17,
"offset": 46
}
},
"specifier": "foo"
}
],
"selfClosing": true,
"children": [],
"position": {
"start": {
"line": 5,
"column": 1,
"offset": 30
},
"end": {
"line": 5,
"column": 19,
"offset": 48
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 19,
"offset": 48
}
}
}