svelte-parse
Version:
An increidbly relaxed svelte-parser
125 lines (124 loc) • 2.02 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteElement",
"tagName": "div",
"properties": [
{
"type": "svelteProperty",
"name": "title",
"value": [
{
"type": "text",
"value": "foo",
"position": {
"start": {
"line": 1,
"column": 13,
"offset": 12
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
}
],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 1,
"column": 6,
"offset": 5
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
},
{
"type": "svelteProperty",
"name": "title",
"value": [
{
"type": "svelteDynamicContent",
"expression": {
"type": "svelteExpression",
"value": "title",
"position": {
"start": {
"line": 1,
"column": 19,
"offset": 18
},
"end": {
"line": 1,
"column": 24,
"offset": 23
}
}
},
"position": {
"start": {
"line": 1,
"column": 18,
"offset": 17
},
"end": {
"line": 1,
"column": 24,
"offset": 23
}
}
}
],
"modifiers": [],
"shorthand": "expression",
"position": {
"start": {
"line": 1,
"column": 18,
"offset": 17
},
"end": {
"line": 1,
"column": 24,
"offset": 23
}
}
}
],
"selfClosing": false,
"children": [],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 32,
"offset": 31
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 32,
"offset": 31
}
}
}