svelte-parse
Version:
An increidbly relaxed svelte-parser
225 lines (224 loc) • 3.58 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n import Search from '@sveltekit/ui/Search';\n\n let searchText = '';\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 5,
"column": 1,
"offset": 78
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 10,
"offset": 87
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 5,
"column": 10,
"offset": 87
},
"end": {
"line": 7,
"column": 1,
"offset": 89
}
}
},
{
"type": "svelteComponent",
"tagName": "Search",
"properties": [
{
"type": "svelteDirective",
"name": "bind",
"value": [
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 7,
"column": 20,
"offset": 108
},
"end": {
"line": 7,
"column": 32,
"offset": 120
}
},
"expression": {
"type": "svelteExpression",
"value": "searchText",
"position": {
"start": {
"line": 7,
"column": 21,
"offset": 109
},
"end": {
"line": 7,
"column": 31,
"offset": 119
}
}
}
}
],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 7,
"column": 9,
"offset": 97
},
"end": {
"line": 7,
"column": 32,
"offset": 120
}
},
"specifier": "value"
}
],
"selfClosing": true,
"children": [],
"position": {
"start": {
"line": 7,
"column": 1,
"offset": 89
},
"end": {
"line": 7,
"column": 35,
"offset": 123
}
}
},
{
"type": "text",
"value": "\n",
"position": {
"start": {
"line": 7,
"column": 35,
"offset": 123
},
"end": {
"line": 8,
"column": 1,
"offset": 124
}
}
},
{
"type": "svelteElement",
"tagName": "p",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "Search text: ",
"position": {
"start": {
"line": 8,
"column": 4,
"offset": 127
},
"end": {
"line": 8,
"column": 17,
"offset": 140
}
}
},
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 8,
"column": 17,
"offset": 140
},
"end": {
"line": 8,
"column": 29,
"offset": 152
}
},
"expression": {
"type": "svelteExpression",
"value": "searchText",
"position": {
"start": {
"line": 8,
"column": 18,
"offset": 141
},
"end": {
"line": 8,
"column": 28,
"offset": 151
}
}
}
}
],
"position": {
"start": {
"line": 8,
"column": 1,
"offset": 124
},
"end": {
"line": 8,
"column": 33,
"offset": 156
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 8,
"column": 33,
"offset": 156
}
}
}