svelte-parse
Version:
An increidbly relaxed svelte-parser
107 lines (106 loc) • 1.68 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteElement",
"tagName": "button",
"properties": [
{
"type": "svelteDirective",
"name": "on",
"value": [
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 1,
"column": 19,
"offset": 18
},
"end": {
"line": 1,
"column": 24,
"offset": 23
}
},
"expression": {
"type": "svelteExpression",
"value": "foo",
"position": {
"start": {
"line": 1,
"column": 20,
"offset": 19
},
"end": {
"line": 1,
"column": 23,
"offset": 22
}
}
}
}
],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 1,
"column": 24,
"offset": 23
}
},
"specifier": "click"
}
],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "Click",
"position": {
"start": {
"line": 1,
"column": 25,
"offset": 24
},
"end": {
"line": 1,
"column": 30,
"offset": 29
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 39,
"offset": 38
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 39,
"offset": 38
}
}
}