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": "animals as animal",
"position": {
"start": {
"line": 1,
"column": 8,
"offset": 7
},
"end": {
"line": 1,
"column": 25,
"offset": 24
}
}
},
"children": [
{
"type": "text",
"value": "\n\t",
"position": {
"start": {
"line": 1,
"column": 26,
"offset": 25
},
"end": {
"line": 2,
"column": 2,
"offset": 27
}
}
},
{
"type": "svelteElement",
"tagName": "p",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 2,
"column": 5,
"offset": 30
},
"end": {
"line": 2,
"column": 13,
"offset": 38
}
},
"expression": {
"type": "svelteExpression",
"value": "animal",
"position": {
"start": {
"line": 2,
"column": 6,
"offset": 31
},
"end": {
"line": 2,
"column": 12,
"offset": 37
}
}
}
}
],
"position": {
"start": {
"line": 2,
"column": 2,
"offset": 27
},
"end": {
"line": 2,
"column": 17,
"offset": 42
}
}
},
{
"type": "text",
"value": "\n",
"position": {
"start": {
"line": 2,
"column": 17,
"offset": 42
},
"end": {
"line": 3,
"column": 1,
"offset": 43
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 1,
"offset": 43
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 8,
"offset": 50
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 8,
"offset": 50
}
}
}