svelte-parse
Version:
An increidbly relaxed svelte-parser
193 lines (192 loc) • 2.99 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": 85
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 10,
"offset": 94
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 5,
"column": 10,
"offset": 94
},
"end": {
"line": 7,
"column": 1,
"offset": 96
}
}
},
{
"type": "svelteComponent",
"tagName": "RangeSlider",
"properties": [
{
"type": "svelteDirective",
"name": "bind",
"value": [],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 7,
"column": 14,
"offset": 109
},
"end": {
"line": 7,
"column": 25,
"offset": 120
}
},
"specifier": "values"
}
],
"selfClosing": false,
"children": [],
"position": {
"start": {
"line": 7,
"column": 1,
"offset": 96
},
"end": {
"line": 7,
"column": 40,
"offset": 135
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 7,
"column": 40,
"offset": 135
},
"end": {
"line": 9,
"column": 1,
"offset": 137
}
}
},
{
"type": "svelteElement",
"tagName": "p",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "selected: ",
"position": {
"start": {
"line": 9,
"column": 4,
"offset": 140
},
"end": {
"line": 9,
"column": 14,
"offset": 150
}
}
},
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 9,
"column": 14,
"offset": 150
},
"end": {
"line": 9,
"column": 25,
"offset": 161
}
},
"expression": {
"type": "svelteExpression",
"value": "values[0]",
"position": {
"start": {
"line": 9,
"column": 15,
"offset": 151
},
"end": {
"line": 9,
"column": 24,
"offset": 160
}
}
}
}
],
"position": {
"start": {
"line": 9,
"column": 1,
"offset": 137
},
"end": {
"line": 9,
"column": 29,
"offset": 165
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 9,
"column": 29,
"offset": 165
}
}
}