svelte-parse
Version:
An increidbly relaxed svelte-parser
244 lines (243 loc) • 4.04 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n import wNumb from 'wnumb';\n import RangeSlider from '@sveltekit/ui/RangeSlider';\n \n let values = [0,100];\n let tooltip = wNumb({ decimals: 1 });\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 7,
"column": 1,
"offset": 160
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 7,
"column": 10,
"offset": 169
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 7,
"column": 10,
"offset": 169
},
"end": {
"line": 9,
"column": 1,
"offset": 171
}
}
},
{
"type": "svelteComponent",
"tagName": "RangeSlider",
"properties": [
{
"type": "svelteDirective",
"name": "bind",
"value": [],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 9,
"column": 14,
"offset": 184
},
"end": {
"line": 9,
"column": 25,
"offset": 195
}
},
"specifier": "values"
},
{
"type": "svelteProperty",
"name": "tooltip",
"value": [
{
"type": "svelteDynamicContent",
"expression": {
"type": "svelteExpression",
"value": "tooltip",
"position": {
"start": {
"line": 9,
"column": 27,
"offset": 197
},
"end": {
"line": 9,
"column": 34,
"offset": 204
}
}
},
"position": {
"start": {
"line": 9,
"column": 26,
"offset": 196
},
"end": {
"line": 9,
"column": 34,
"offset": 204
}
}
}
],
"modifiers": [],
"shorthand": "expression",
"position": {
"start": {
"line": 9,
"column": 26,
"offset": 196
},
"end": {
"line": 9,
"column": 34,
"offset": 204
}
}
}
],
"selfClosing": false,
"children": [],
"position": {
"start": {
"line": 9,
"column": 1,
"offset": 171
},
"end": {
"line": 9,
"column": 50,
"offset": 220
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 9,
"column": 50,
"offset": 220
},
"end": {
"line": 11,
"column": 1,
"offset": 222
}
}
},
{
"type": "svelteElement",
"tagName": "p",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "selected: ",
"position": {
"start": {
"line": 11,
"column": 4,
"offset": 225
},
"end": {
"line": 11,
"column": 14,
"offset": 235
}
}
},
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 11,
"column": 14,
"offset": 235
},
"end": {
"line": 11,
"column": 38,
"offset": 259
}
},
"expression": {
"type": "svelteExpression",
"value": "JSON.stringify(values)",
"position": {
"start": {
"line": 11,
"column": 15,
"offset": 236
},
"end": {
"line": 11,
"column": 37,
"offset": 258
}
}
}
}
],
"position": {
"start": {
"line": 11,
"column": 1,
"offset": 222
},
"end": {
"line": 11,
"column": 42,
"offset": 263
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 11,
"column": 42,
"offset": 263
}
}
}