swc/crates/swc_ecma_parser/tests/tsc/parserVariableDeclaration3.json

344 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 244,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 9,
"end": 17,
"ctxt": 0
},
"value": "runTests",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 0,
"end": 244,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 20,
"end": 244,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 26,
"end": 242,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 30,
"end": 79,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 30,
"end": 37,
"ctxt": 0
},
"value": "outfile",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 40,
"end": 79,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 44,
"end": 77,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 44,
"end": 60,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 44,
"end": 51,
"ctxt": 0
},
"value": "Harness",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 52,
"end": 60,
"ctxt": 0
},
"value": "Compiler",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 61,
"end": 77,
"ctxt": 0
},
"value": "WriterAggregator",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 88,
"end": 136,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 88,
"end": 94,
"ctxt": 0
},
"value": "outerr",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 97,
"end": 136,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 101,
"end": 134,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 101,
"end": 117,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 101,
"end": 108,
"ctxt": 0
},
"value": "Harness",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 109,
"end": 117,
"ctxt": 0
},
"value": "Compiler",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 118,
"end": 134,
"ctxt": 0
},
"value": "WriterAggregator",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 145,
"end": 228,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 145,
"end": 153,
"ctxt": 0
},
"value": "compiler",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsTypeAssertion",
"span": {
"start": 156,
"end": 228,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 187,
"end": 228,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 191,
"end": 220,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 191,
"end": 201,
"ctxt": 0
},
"value": "TypeScript",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 202,
"end": 220,
"ctxt": 0
},
"value": "TypeScriptCompiler",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 221,
"end": 227,
"ctxt": 0
},
"value": "outerr",
"optional": false
}
}
],
"typeArguments": null
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 157,
"end": 186,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 157,
"end": 167,
"ctxt": 0
},
"value": "TypeScript",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 168,
"end": 186,
"ctxt": 0
},
"value": "TypeScriptCompiler",
"optional": false
}
},
"typeParams": null
}
},
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 237,
"end": 241,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 237,
"end": 241,
"ctxt": 0
},
"value": "code",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}