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/dynamic-import/output.json

482 lines
11 KiB

{
"html": {
"start": null,
"end": null,
"type": "Fragment",
"children": []
},
"instance": {
"type": "Script",
"start": 0,
"end": 146,
"context": "default",
"content": {
"type": "Program",
"start": 8,
"end": 137,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 9,
"column": 0
}
},
"body": [
{
"type": "ImportDeclaration",
"start": 10,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 34
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 2,
"column": 10
},
"end": {
"line": 2,
"column": 17
}
},
"imported": {
"type": "Identifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 2,
"column": 10
},
"end": {
"line": 2,
"column": 17
}
},
"name": "onMount"
},
"local": {
"type": "Identifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 2,
"column": 10
},
"end": {
"line": 2,
"column": 17
}
},
"name": "onMount"
}
}
],
"source": {
"type": "Literal",
"start": 34,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 33
}
},
"value": "svelte",
"raw": "'svelte'"
}
},
{
"type": "ExpressionStatement",
"start": 46,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 1
},
"end": {
"line": 8,
"column": 4
}
},
"expression": {
"type": "CallExpression",
"start": 46,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 1
},
"end": {
"line": 8,
"column": 3
}
},
"callee": {
"type": "Identifier",
"start": 46,
"end": 53,
"loc": {
"start": {
"line": 4,
"column": 1
},
"end": {
"line": 4,
"column": 8
}
},
"name": "onMount"
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 54,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 8,
"column": 2
}
},
"id": null,
"expression": false,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 60,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 8,
"column": 2
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 64,
"end": 131,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 7,
"column": 5
}
},
"expression": {
"type": "CallExpression",
"start": 64,
"end": 130,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 7,
"column": 4
}
},
"callee": {
"type": "MemberExpression",
"start": 64,
"end": 87,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 25
}
},
"object": {
"type": "ImportExpression",
"start": 64,
"end": 82,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 20
}
},
"source": {
"type": "Literal",
"start": 71,
"end": 81,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 19
}
},
"value": "./foo.js",
"raw": "'./foo.js'"
}
},
"property": {
"type": "Identifier",
"start": 83,
"end": 87,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 25
}
},
"name": "then"
},
"computed": false,
"optional": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 88,
"end": 129,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 7,
"column": 3
}
},
"id": null,
"expression": false,
"generator": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 88,
"end": 91,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 29
}
},
"name": "foo"
}
],
"body": {
"type": "BlockStatement",
"start": 95,
"end": 129,
"loc": {
"start": {
"line": 5,
"column": 33
},
"end": {
"line": 7,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 100,
"end": 125,
"loc": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 28
}
},
"expression": {
"type": "CallExpression",
"start": 100,
"end": 124,
"loc": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 27
}
},
"callee": {
"type": "MemberExpression",
"start": 100,
"end": 111,
"loc": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 100,
"end": 107,
"loc": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 10
}
},
"name": "console"
},
"property": {
"type": "Identifier",
"start": 108,
"end": 111,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 14
}
},
"name": "log"
},
"computed": false,
"optional": false
},
"arguments": [
{
"type": "MemberExpression",
"start": 112,
"end": 123,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 112,
"end": 115,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 18
}
},
"name": "foo"
},
"property": {
"type": "Identifier",
"start": 116,
"end": 123,
"loc": {
"start": {
"line": 6,
"column": 19
},
"end": {
"line": 6,
"column": 26
}
},
"name": "default"
},
"computed": false,
"optional": false
}
],
"optional": false
}
}
]
}
}
],
"optional": false
}
}
]
}
}
],
"optional": false
}
}
],
"sourceType": "module"
}
}
}