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

1234 lines
29 KiB
JSON

{
"type": "Module",
"span": {
"start": 73,
"end": 983,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 73,
"end": 96,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 80,
"end": 96,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 84,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 84,
"end": 92,
"ctxt": 0
},
"value": "inModule",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 97,
"end": 115,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 97,
"end": 115,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 97,
"end": 113,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 97,
"end": 105,
"ctxt": 0
},
"value": "inmodule",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 106,
"end": 113,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 117,
"end": 274,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 130,
"end": 274,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 136,
"end": 157,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 140,
"end": 157,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 140,
"end": 146,
"ctxt": 0
},
"value": "locals",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 149,
"end": 157,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"right": {
"type": "BooleanLiteral",
"span": {
"start": 153,
"end": 157,
"ctxt": 0
},
"value": true
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 162,
"end": 178,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 162,
"end": 178,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 162,
"end": 176,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 162,
"end": 168,
"ctxt": 0
},
"value": "locale",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 169,
"end": 176,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 207,
"end": 229,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 207,
"end": 229,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 207,
"end": 227,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 207,
"end": 213,
"ctxt": 0
},
"value": "localf",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 214,
"end": 227,
"ctxt": 0
},
"value": "toExponential",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 258,
"end": 272,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 258,
"end": 272,
"ctxt": 0
},
"value": "this is fine",
"raw": "\"this is fine\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 281,
"end": 287,
"ctxt": 0
},
"value": "Classe",
"optional": false
},
"declare": false,
"span": {
"start": 275,
"end": 395,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 294,
"end": 305,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 294,
"end": 297,
"ctxt": 0
},
"value": "non",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 300,
"end": 305,
"ctxt": 0
},
"value": "oui",
"raw": "'oui'"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 310,
"end": 393,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 310,
"end": 317,
"ctxt": 0
},
"value": "methode",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 310,
"end": 393,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 320,
"end": 393,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 371,
"end": 387,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 378,
"end": 387,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 378,
"end": 382,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 383,
"end": 387,
"ctxt": 0
},
"value": "none",
"optional": false
}
}
}
]
},
"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": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 402,
"end": 409,
"ctxt": 0
},
"value": "Derivee",
"optional": false
},
"declare": false,
"span": {
"start": 396,
"end": 518,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 431,
"end": 516,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 431,
"end": 438,
"ctxt": 0
},
"value": "methode",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 431,
"end": 516,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 441,
"end": 516,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 493,
"end": 510,
"ctxt": 0
},
"argument": {
"type": "SuperPropExpression",
"span": {
"start": 500,
"end": 510,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 500,
"end": 505,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 506,
"end": 510,
"ctxt": 0
},
"value": "none",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 418,
"end": 424,
"ctxt": 0
},
"value": "Classe",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 521,
"end": 552,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 525,
"end": 552,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 525,
"end": 531,
"ctxt": 0
},
"value": "object",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 534,
"end": 552,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 540,
"end": 547,
"ctxt": 0
},
"value": "spaaace",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 549,
"end": 550,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 553,
"end": 568,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 553,
"end": 568,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 553,
"end": 559,
"ctxt": 0
},
"value": "object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 560,
"end": 568,
"ctxt": 0
},
"value": "spaaaace",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 586,
"end": 604,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 586,
"end": 604,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 586,
"end": 599,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 586,
"end": 592,
"ctxt": 0
},
"value": "object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 593,
"end": 599,
"ctxt": 0
},
"value": "spaace",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 602,
"end": 604,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 623,
"end": 640,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 623,
"end": 640,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 623,
"end": 635,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 623,
"end": 629,
"ctxt": 0
},
"value": "object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 630,
"end": 635,
"ctxt": 0
},
"value": "fresh",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 638,
"end": 640,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 647,
"end": 659,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 647,
"end": 659,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 647,
"end": 652,
"ctxt": 0
},
"value": "other",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 653,
"end": 659,
"ctxt": 0
},
"value": "puuuce",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 685,
"end": 708,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 685,
"end": 708,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 685,
"end": 706,
"ctxt": 0
},
"object": {
"type": "NewExpression",
"span": {
"start": 685,
"end": 695,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 689,
"end": 693,
"ctxt": 0
},
"value": "Date",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"property": {
"type": "Identifier",
"span": {
"start": 696,
"end": 706,
"ctxt": 0
},
"value": "getGMTDate",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 782,
"end": 836,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 788,
"end": 836,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 788,
"end": 792,
"ctxt": 0
},
"value": "atoc",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 795,
"end": 836,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 795,
"end": 806,
"ctxt": 0
},
"value": "setIntegral",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 807,
"end": 830,
"ctxt": 0
},
"params": [],
"body": {
"type": "CallExpression",
"span": {
"start": 813,
"end": 830,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 813,
"end": 824,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 813,
"end": 820,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 821,
"end": 824,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 825,
"end": 829,
"ctxt": 0
},
"value": "ok",
"raw": "'ok'"
}
}
],
"typeArguments": null
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 832,
"end": 835,
"ctxt": 0
},
"value": 500.0,
"raw": "500"
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 837,
"end": 848,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 837,
"end": 848,
"ctxt": 0
},
"value": "AudioBuffin",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 856,
"end": 861,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 856,
"end": 861,
"ctxt": 0
},
"value": "Jimmy",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 862,
"end": 865,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 862,
"end": 865,
"ctxt": 0
},
"value": "Jon",
"optional": false
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 890,
"end": 903,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 894,
"end": 903,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 894,
"end": 899,
"ctxt": 0
},
"value": "Jimmy",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 902,
"end": 903,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 904,
"end": 916,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 908,
"end": 916,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 908,
"end": 912,
"ctxt": 0
},
"value": "John",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 915,
"end": 916,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 917,
"end": 920,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 917,
"end": 920,
"ctxt": 0
},
"value": "Jon",
"optional": false
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 955,
"end": 983,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 959,
"end": 983,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 959,
"end": 964,
"ctxt": 0
},
"value": "other",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 967,
"end": 983,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 973,
"end": 978,
"ctxt": 0
},
"value": "puuce",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 980,
"end": 981,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}