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/packages/svelte/tests/parser-legacy/samples/await-then-catch/output.json

255 lines
4.5 KiB

{
"html": {
"type": "Fragment",
"start": 0,
"end": 148,
"children": [
{
"type": "AwaitBlock",
"start": 0,
"end": 148,
"expression": {
"type": "Identifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
}
},
"name": "thePromise"
},
"value": {
"type": "Identifier",
"name": "theValue",
"start": 46,
"loc": {
"start": {
"line": 3,
"column": 7,
"character": 46
},
"end": {
"line": 3,
"column": 15,
"character": 54
}
},
"end": 54
},
"error": {
"type": "Identifier",
"name": "theError",
"start": 96,
"loc": {
"start": {
"line": 5,
"column": 8,
"character": 96
},
"end": {
"line": 5,
"column": 16,
"character": 104
}
},
"end": 104
},
"pending": {
"type": "PendingBlock",
"start": 19,
"end": 39,
"children": [
{
"type": "Text",
"start": 19,
"end": 21,
"raw": "\n\t",
"data": "\n\t"
},
{
"type": "Element",
"start": 21,
"end": 38,
"name": "p",
"attributes": [],
"children": [
{
"type": "Text",
"start": 24,
"end": 34,
"raw": "loading...",
"data": "loading..."
}
]
},
{
"type": "Text",
"start": 38,
"end": 39,
"raw": "\n",
"data": "\n"
}
],
"skip": false
},
"then": {
"type": "ThenBlock",
"start": 39,
"end": 88,
"children": [
{
"type": "Text",
"start": 55,
"end": 57,
"raw": "\n\t",
"data": "\n\t"
},
{
"type": "Element",
"start": 57,
"end": 87,
"name": "p",
"attributes": [],
"children": [
{
"type": "Text",
"start": 60,
"end": 73,
"raw": "the value is ",
"data": "the value is "
},
{
"type": "MustacheTag",
"start": 73,
"end": 83,
"expression": {
"type": "Identifier",
"start": 74,
"end": 82,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 4,
"column": 26
}
},
"name": "theValue"
}
}
]
},
{
"type": "Text",
"start": 87,
"end": 88,
"raw": "\n",
"data": "\n"
}
],
"skip": false
},
"catch": {
"type": "CatchBlock",
"start": 88,
"end": 140,
"children": [
{
"type": "Text",
"start": 105,
"end": 107,
"raw": "\n\t",
"data": "\n\t"
},
{
"type": "Element",
"start": 107,
"end": 139,
"name": "p",
"attributes": [],
"children": [
{
"type": "Text",
"start": 110,
"end": 117,
"raw": "oh no! ",
"data": "oh no! "
},
{
"type": "MustacheTag",
"start": 117,
"end": 135,
"expression": {
"type": "MemberExpression",
"start": 118,
"end": 134,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 118,
"end": 126,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 20
}
},
"name": "theError"
},
"property": {
"type": "Identifier",
"start": 127,
"end": 134,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 28
}
},
"name": "message"
},
"computed": false,
"optional": false
}
}
]
},
{
"type": "Text",
"start": 139,
"end": 140,
"raw": "\n",
"data": "\n"
}
],
"skip": false
}
}
]
}
}