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-comment-trailing/output.json

158 lines
2.5 KiB

{
"html": {
"start": 68,
"end": 90,
"type": "Fragment",
"children": [
{
"start": 66,
"end": 68,
"type": "Text",
"raw": "\n\n",
"data": "\n\n"
},
{
"start": 68,
"end": 90,
"type": "Element",
"name": "h1",
"attributes": [],
"children": [
{
"start": 72,
"end": 78,
"type": "Text",
"raw": "Hello ",
"data": "Hello "
},
{
"start": 78,
"end": 84,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 79,
"end": 83,
"loc": {
"start": {
"line": 7,
"column": 11
},
"end": {
"line": 7,
"column": 15
}
},
"name": "name"
}
},
{
"start": 84,
"end": 85,
"type": "Text",
"raw": "!",
"data": "!"
}
]
}
]
},
"instance": {
"type": "Script",
"start": 0,
"end": 66,
"context": "default",
"content": {
"type": "Program",
"start": 8,
"end": 57,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 0
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 10,
"end": 29,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 20
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 14,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 19
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 18,
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 9
}
},
"name": "name"
},
"init": {
"type": "Literal",
"start": 21,
"end": 28,
"loc": {
"start": {
"line": 2,
"column": 12
},
"end": {
"line": 2,
"column": 19
}
},
"value": "world",
"raw": "'world'"
}
}
],
"kind": "let"
}
],
"sourceType": "module",
"trailingComments": [
{
"type": "Line",
"value": " trailing line comment",
"start": 32,
"end": 56
}
]
}
}
}