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/event-handler/output.json

104 lines
1.8 KiB

{
"html": {
"start": 0,
"end": 97,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 61,
"type": "Element",
"name": "button",
"attributes": [
{
"start": 8,
"end": 45,
"type": "EventHandler",
"name": "click",
"modifiers": [],
"expression": {
"type": "ArrowFunctionExpression",
"start": 19,
"end": 43,
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [],
"body": {
"type": "AssignmentExpression",
"start": 25,
"end": 43,
"operator": "=",
"left": {
"type": "Identifier",
"start": 25,
"end": 32,
"name": "visible"
},
"right": {
"type": "UnaryExpression",
"start": 35,
"end": 43,
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 36,
"end": 43,
"name": "visible"
}
}
}
}
}
],
"children": [
{
"start": 46,
"end": 52,
"type": "Text",
"data": "toggle"
}
]
},
{
"start": 61,
"end": 63,
"type": "Text",
"data": "\n\n"
},
{
"start": 63,
"end": 97,
"type": "IfBlock",
"expression": {
"type": "Identifier",
"start": 68,
"end": 75,
"name": "visible"
},
"children": [
{
"start": 78,
"end": 91,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 81,
"end": 87,
"type": "Text",
"data": "hello!"
}
]
}
]
}
]
},
"css": null,
"instance": null,
"module": null
}