svelte-parse
Version:
An increidbly relaxed svelte-parser
142 lines (141 loc) • 2.2 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n\tlet name;\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 3,
"column": 1,
"offset": 20
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 10,
"offset": 29
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 3,
"column": 10,
"offset": 29
},
"end": {
"line": 5,
"column": 1,
"offset": 31
}
}
},
{
"type": "svelteElement",
"tagName": "input",
"properties": [
{
"type": "svelteDirective",
"name": "bind",
"value": [
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 5,
"column": 19,
"offset": 49
},
"end": {
"line": 5,
"column": 25,
"offset": 55
}
},
"expression": {
"type": "svelteExpression",
"value": "name",
"position": {
"start": {
"line": 5,
"column": 20,
"offset": 50
},
"end": {
"line": 5,
"column": 24,
"offset": 54
}
}
}
}
],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 5,
"column": 8,
"offset": 38
},
"end": {
"line": 5,
"column": 25,
"offset": 55
}
},
"specifier": "value"
}
],
"selfClosing": true,
"children": [],
"position": {
"start": {
"line": 5,
"column": 1,
"offset": 31
},
"end": {
"line": 5,
"column": 26,
"offset": 56
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 26,
"offset": 56
}
}
}