svelte-parse
Version:
An increidbly relaxed svelte-parser
109 lines (108 loc) • 1.75 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteComponent",
"tagName": "Widget",
"properties": [
{
"type": "svelteProperty",
"name": "foo",
"value": [
{
"type": "svelteDynamicContent",
"position": {
"start": {
"line": 1,
"column": 13,
"offset": 12
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
},
"expression": {
"type": "svelteExpression",
"value": "42",
"position": {
"start": {
"line": 1,
"column": 14,
"offset": 13
},
"end": {
"line": 1,
"column": 16,
"offset": 15
}
}
}
}
],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
},
{
"type": "svelteDirective",
"name": "bind",
"value": [],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 1,
"column": 18,
"offset": 17
},
"end": {
"line": 1,
"column": 26,
"offset": 25
}
},
"specifier": "foo"
}
],
"selfClosing": true,
"children": [],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 28,
"offset": 27
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 28,
"offset": 27
}
}
}