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

738 lines
16 KiB
JSON

{
"type": "Module",
"span": {
"start": 160,
"end": 395,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 160,
"end": 174,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 160,
"end": 173,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 160,
"end": 169,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 160,
"end": 167,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"value": "j",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 172,
"end": 173,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 175,
"end": 194,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 175,
"end": 193,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 175,
"end": 184,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 175,
"end": 182,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 183,
"end": 184,
"ctxt": 0
},
"value": "k",
"optional": false
}
},
"right": {
"type": "UnaryExpression",
"span": {
"start": 187,
"end": 193,
"ctxt": 0
},
"operator": "void",
"argument": {
"type": "NumericLiteral",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 195,
"end": 205,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 199,
"end": 205,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "o",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 203,
"end": 205,
"ctxt": 0
},
"properties": []
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 206,
"end": 213,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 206,
"end": 213,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 206,
"end": 209,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 206,
"end": 207,
"ctxt": 0
},
"value": "o",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 208,
"end": 209,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 212,
"end": 213,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 214,
"end": 226,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 214,
"end": 226,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 214,
"end": 217,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "o",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"right": {
"type": "UnaryExpression",
"span": {
"start": 220,
"end": 226,
"ctxt": 0
},
"operator": "void",
"argument": {
"type": "NumericLiteral",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 227,
"end": 236,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 227,
"end": 236,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 227,
"end": 230,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 227,
"end": 228,
"ctxt": 0
},
"value": "o",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 229,
"end": 230,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "MemberExpression",
"span": {
"start": 233,
"end": 236,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": "o",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 247,
"end": 248,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 238,
"end": 289,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 251,
"end": 289,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 257,
"end": 267,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 257,
"end": 267,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 257,
"end": 263,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 257,
"end": 261,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 262,
"end": 263,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 272,
"end": 287,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 272,
"end": 287,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 272,
"end": 278,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 272,
"end": 276,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "q",
"optional": false
}
},
"right": {
"type": "UnaryExpression",
"span": {
"start": 281,
"end": 287,
"ctxt": 0
},
"operator": "void",
"argument": {
"type": "NumericLiteral",
"span": {
"start": 286,
"end": 287,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 290,
"end": 305,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 294,
"end": 305,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 294,
"end": 295,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 298,
"end": 305,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 302,
"end": 303,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 306,
"end": 315,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 306,
"end": 315,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 306,
"end": 309,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 306,
"end": 307,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 308,
"end": 309,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "MemberExpression",
"span": {
"start": 312,
"end": 315,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 314,
"end": 315,
"ctxt": 0
},
"value": "q",
"optional": false
}
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 343,
"end": 389,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 352,
"end": 353,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 352,
"end": 353,
"ctxt": 0
},
"value": "j",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"value": "k",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 364,
"end": 389,
"ctxt": 0
},
"value": "./assignmentToVoidZero2",
"raw": "'./assignmentToVoidZero2'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 390,
"end": 395,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 390,
"end": 395,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "Identifier",
"span": {
"start": 390,
"end": 391,
"ctxt": 0
},
"value": "j",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 394,
"end": 395,
"ctxt": 0
},
"value": "k",
"optional": false
}
}
}
],
"interpreter": null
}