svelte-parse
Version:
An increidbly relaxed svelte-parser
101 lines (100 loc) • 1.5 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteElement",
"tagName": "h1",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "hello ",
"position": {
"start": {
"line": 1,
"column": 5,
"offset": 4
},
"end": {
"line": 1,
"column": 11,
"offset": 10
}
}
},
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 1,
"column": 11,
"offset": 10
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
},
"expression": {
"type": "svelteExpression",
"value": "name",
"position": {
"start": {
"line": 1,
"column": 12,
"offset": 11
},
"end": {
"line": 1,
"column": 16,
"offset": 15
}
}
}
},
{
"type": "text",
"value": "!",
"position": {
"start": {
"line": 1,
"column": 17,
"offset": 16
},
"end": {
"line": 1,
"column": 18,
"offset": 17
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
}
}
}