svelte-parse
Version:
An increidbly relaxed svelte-parser
153 lines (152 loc) • 2.6 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteBranchingBlock",
"name": "each",
"branches": [
{
"type": "svelteBranch",
"name": "each",
"expression": {
"type": "svelteExpression",
"value": "todos as todo (todo.id)",
"position": {
"start": {
"line": 1,
"column": 8,
"offset": 7
},
"end": {
"line": 1,
"column": 31,
"offset": 30
}
}
},
"children": [
{
"type": "text",
"value": "\n\t",
"position": {
"start": {
"line": 1,
"column": 32,
"offset": 31
},
"end": {
"line": 2,
"column": 2,
"offset": 33
}
}
},
{
"type": "svelteElement",
"tagName": "p",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 2,
"column": 5,
"offset": 36
},
"end": {
"line": 2,
"column": 11,
"offset": 42
}
},
"expression": {
"type": "svelteExpression",
"value": "todo",
"position": {
"start": {
"line": 2,
"column": 6,
"offset": 37
},
"end": {
"line": 2,
"column": 10,
"offset": 41
}
}
}
}
],
"position": {
"start": {
"line": 2,
"column": 2,
"offset": 33
},
"end": {
"line": 2,
"column": 15,
"offset": 46
}
}
},
{
"type": "text",
"value": "\n",
"position": {
"start": {
"line": 2,
"column": 15,
"offset": 46
},
"end": {
"line": 3,
"column": 1,
"offset": 47
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 1,
"offset": 47
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 8,
"offset": 54
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 8,
"offset": 54
}
}
}