svelte-parse
Version:
An increidbly relaxed svelte-parser
137 lines (136 loc) • 2.2 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteElement",
"tagName": "textarea",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n\t",
"position": {
"start": {
"line": 1,
"column": 11,
"offset": 10
},
"end": {
"line": 2,
"column": 2,
"offset": 12
}
}
},
{
"type": "svelteElement",
"tagName": "p",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "not actually an element. ",
"position": {
"start": {
"line": 2,
"column": 5,
"offset": 15
},
"end": {
"line": 2,
"column": 30,
"offset": 40
}
}
},
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 2,
"column": 30,
"offset": 40
},
"end": {
"line": 2,
"column": 35,
"offset": 45
}
},
"expression": {
"type": "svelteExpression",
"value": "foo",
"position": {
"start": {
"line": 2,
"column": 31,
"offset": 41
},
"end": {
"line": 2,
"column": 34,
"offset": 44
}
}
}
}
],
"position": {
"start": {
"line": 2,
"column": 2,
"offset": 12
},
"end": {
"line": 2,
"column": 39,
"offset": 49
}
}
},
{
"type": "text",
"value": "\n",
"position": {
"start": {
"line": 2,
"column": 39,
"offset": 49
},
"end": {
"line": 3,
"column": 1,
"offset": 50
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 12,
"offset": 61
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 12,
"offset": 61
}
}
}