svelte-parse
Version:
An increidbly relaxed svelte-parser
193 lines (192 loc) • 2.97 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n import TextInput from '@sveltekit/ui/TextInput';\n let value = '';\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 4,
"column": 1,
"offset": 78
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 4,
"column": 10,
"offset": 87
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 4,
"column": 10,
"offset": 87
},
"end": {
"line": 6,
"column": 1,
"offset": 89
}
}
},
{
"type": "svelteComponent",
"tagName": "TextInput",
"properties": [
{
"type": "svelteDirective",
"name": "bind",
"value": [],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 6,
"column": 12,
"offset": 100
},
"end": {
"line": 6,
"column": 22,
"offset": 110
}
},
"specifier": "value"
}
],
"selfClosing": false,
"children": [],
"position": {
"start": {
"line": 6,
"column": 1,
"offset": 89
},
"end": {
"line": 6,
"column": 35,
"offset": 123
}
}
},
{
"type": "text",
"value": "\n",
"position": {
"start": {
"line": 6,
"column": 35,
"offset": 123
},
"end": {
"line": 7,
"column": 1,
"offset": 124
}
}
},
{
"type": "svelteElement",
"tagName": "p",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "Value: ",
"position": {
"start": {
"line": 7,
"column": 4,
"offset": 127
},
"end": {
"line": 7,
"column": 11,
"offset": 134
}
}
},
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 7,
"column": 11,
"offset": 134
},
"end": {
"line": 7,
"column": 18,
"offset": 141
}
},
"expression": {
"type": "svelteExpression",
"value": "value",
"position": {
"start": {
"line": 7,
"column": 12,
"offset": 135
},
"end": {
"line": 7,
"column": 17,
"offset": 140
}
}
}
}
],
"position": {
"start": {
"line": 7,
"column": 1,
"offset": 124
},
"end": {
"line": 7,
"column": 22,
"offset": 145
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 7,
"column": 22,
"offset": 145
}
}
}