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/await-catch/output.json

174 lines
3.1 KiB

{
"html": {
"start": 0,
"end": 99,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 99,
"type": "AwaitBlock",
"expression": {
"type": "Identifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
}
},
"name": "thePromise"
},
"value": null,
"error": {
"type": "Identifier",
"name": "theError",
"start": 47,
"end": 55
},
"pending": {
"start": 19,
"end": 39,
"type": "PendingBlock",
"children": [
{
"start": 19,
"end": 21,
"type": "Text",
"raw": "\n\t",
"data": "\n\t"
},
{
"start": 21,
"end": 38,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 24,
"end": 34,
"type": "Text",
"raw": "loading...",
"data": "loading..."
}
]
},
{
"start": 38,
"end": 39,
"type": "Text",
"raw": "\n",
"data": "\n"
}
],
"skip": false
},
"then": {
"start": null,
"end": null,
"type": "ThenBlock",
"children": [],
"skip": true
},
"catch": {
"start": 39,
"end": 91,
"type": "CatchBlock",
"children": [
{
"start": 56,
"end": 58,
"type": "Text",
"raw": "\n\t",
"data": "\n\t"
},
{
"start": 58,
"end": 90,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 61,
"end": 68,
"type": "Text",
"raw": "oh no! ",
"data": "oh no! "
},
{
"start": 68,
"end": 86,
"type": "MustacheTag",
"expression": {
"type": "MemberExpression",
"start": 69,
"end": 85,
"loc": {
"start": {
"line": 4,
"column": 12
},
"end": {
"line": 4,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 69,
"end": 77,
"loc": {
"start": {
"line": 4,
"column": 12
},
"end": {
"line": 4,
"column": 20
}
},
"name": "theError"
},
"property": {
"type": "Identifier",
"start": 78,
"end": 85,
"loc": {
"start": {
"line": 4,
"column": 21
},
"end": {
"line": 4,
"column": 28
}
},
"name": "message"
},
"computed": false,
"optional": false
}
}
]
},
{
"start": 90,
"end": 91,
"type": "Text",
"raw": "\n",
"data": "\n"
}
],
"skip": false
}
}
]
}
}