svelte-parse
Version:
An increidbly relaxed svelte-parser
212 lines (211 loc) • 3.33 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n import RangeSlider from '@sveltekit/ui/RangeSlider';\n \n let values = [0];\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 5,
"column": 1,
"offset": 87
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 10,
"offset": 96
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 5,
"column": 10,
"offset": 96
},
"end": {
"line": 7,
"column": 1,
"offset": 98
}
}
},
{
"type": "svelteComponent",
"tagName": "RangeSlider",
"properties": [
{
"type": "svelteDirective",
"name": "bind",
"value": [],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 7,
"column": 14,
"offset": 111
},
"end": {
"line": 7,
"column": 25,
"offset": 122
}
},
"specifier": "values"
},
{
"type": "svelteProperty",
"name": "updateWhenSliding",
"value": [],
"modifiers": [],
"shorthand": "boolean",
"position": {
"start": {
"line": 7,
"column": 26,
"offset": 123
},
"end": {
"line": 7,
"column": 43,
"offset": 140
}
}
}
],
"selfClosing": false,
"children": [],
"position": {
"start": {
"line": 7,
"column": 1,
"offset": 98
},
"end": {
"line": 7,
"column": 58,
"offset": 155
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 7,
"column": 58,
"offset": 155
},
"end": {
"line": 9,
"column": 1,
"offset": 157
}
}
},
{
"type": "svelteElement",
"tagName": "p",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "selected: ",
"position": {
"start": {
"line": 9,
"column": 4,
"offset": 160
},
"end": {
"line": 9,
"column": 14,
"offset": 170
}
}
},
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 9,
"column": 14,
"offset": 170
},
"end": {
"line": 9,
"column": 25,
"offset": 181
}
},
"expression": {
"type": "svelteExpression",
"value": "values[0]",
"position": {
"start": {
"line": 9,
"column": 15,
"offset": 171
},
"end": {
"line": 9,
"column": 24,
"offset": 180
}
}
}
}
],
"position": {
"start": {
"line": 9,
"column": 1,
"offset": 157
},
"end": {
"line": 9,
"column": 29,
"offset": 185
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 9,
"column": 29,
"offset": 185
}
}
}