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

699 lines
18 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 380,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 67,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 15,
"end": 65,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 15,
"end": 28,
"ctxt": 0
},
"value": "constructor",
"raw": "\"constructor\""
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 31,
"end": 65,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 41,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 41,
"end": 58,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 41,
"end": 52,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 41,
"end": 48,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 49,
"end": 52,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ThisExpression",
"span": {
"start": 53,
"end": 57,
"ctxt": 0
}
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 69,
"end": 135,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 83,
"end": 133,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 83,
"end": 96,
"ctxt": 0
},
"value": "constructor",
"raw": "'constructor'"
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 99,
"end": 133,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 109,
"end": 127,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 109,
"end": 126,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 109,
"end": 120,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 109,
"end": 116,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ThisExpression",
"span": {
"start": 121,
"end": 125,
"ctxt": 0
}
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": "E",
"optional": false
},
"declare": false,
"span": {
"start": 137,
"end": 205,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 151,
"end": 203,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 151,
"end": 166,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 152,
"end": 165,
"ctxt": 0
},
"value": "constructor",
"raw": "'constructor'"
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 151,
"end": 203,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 169,
"end": 203,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 179,
"end": 197,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 179,
"end": 196,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 179,
"end": 190,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 179,
"end": 186,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 187,
"end": 190,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ThisExpression",
"span": {
"start": 191,
"end": 195,
"ctxt": 0
}
}
}
],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 207,
"end": 276,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 207,
"end": 275,
"ctxt": 0
},
"callee": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 211,
"end": 275,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 223,
"end": 273,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 223,
"end": 236,
"ctxt": 0
},
"value": "constructor",
"raw": "\"constructor\""
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 239,
"end": 273,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 249,
"end": 267,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 249,
"end": 266,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 249,
"end": 260,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 249,
"end": 256,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 257,
"end": 260,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ThisExpression",
"span": {
"start": 261,
"end": 265,
"ctxt": 0
}
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"arguments": null,
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 278,
"end": 309,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 282,
"end": 308,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "o",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 286,
"end": 308,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 288,
"end": 301,
"ctxt": 0
},
"value": "constructor",
"raw": "\"constructor\""
},
"params": [],
"decorators": [],
"span": {
"start": 288,
"end": 306,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 304,
"end": 306,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 317,
"end": 318,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"span": {
"start": 311,
"end": 380,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 325,
"end": 378,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 325,
"end": 341,
"ctxt": 0
},
"value": "constructor",
"raw": "\"\\x63onstructor\""
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 344,
"end": 378,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 354,
"end": 372,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 354,
"end": 371,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 354,
"end": 365,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 354,
"end": 361,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 362,
"end": 365,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ThisExpression",
"span": {
"start": 366,
"end": 370,
"ctxt": 0
}
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}