You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/parser/samples/script/output.json

128 lines
2.3 KiB

{
"hash": "6jy7zq",
"html": {
"start": 0,
"end": 22,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 22,
"type": "Element",
"name": "h1",
"attributes": [],
"children": [
{
"start": 4,
"end": 10,
"type": "Text",
"data": "Hello "
},
{
"start": 10,
"end": 16,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 11,
"end": 15,
"name": "name"
}
},
{
"start": 16,
"end": 17,
"type": "Text",
"data": "!"
}
]
},
{
"start": 22,
"end": 24,
"type": "Text",
"data": "\n\n"
}
]
},
"css": null,
"js": {
"start": 24,
"end": 103,
"attributes": [],
"content": {
"type": "Program",
"start": 32,
"end": 94,
"body": [
{
"type": "ExportDefaultDeclaration",
"start": 34,
"end": 93,
"declaration": {
"type": "ObjectExpression",
"start": 49,
"end": 92,
"properties": [
{
"type": "Property",
"start": 53,
"end": 89,
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 53,
"end": 57,
"name": "data"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 59,
"end": 89,
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [],
"body": {
"type": "ObjectExpression",
"start": 66,
"end": 88,
"properties": [
{
"type": "Property",
"start": 71,
"end": 84,
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 71,
"end": 75,
"name": "name"
},
"value": {
"type": "Literal",
"start": 77,
"end": 84,
"value": "world",
"raw": "'world'"
},
"kind": "init"
}
]
}
},
"kind": "init"
}
]
}
}
],
"sourceType": "module"
}
}
}