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

1136 lines
26 KiB
JSON

{
"type": "Script",
"span": {
"start": 21,
"end": 541,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 21,
"end": 59,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 27,
"end": 58,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 27,
"end": 31,
"ctxt": 0
},
"value": "enUS",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 34,
"end": 58,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 38,
"end": 49,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 38,
"end": 42,
"ctxt": 0
},
"value": "Intl",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 43,
"end": 49,
"ctxt": 0
},
"value": "Locale",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 50,
"end": 57,
"ctxt": 0
},
"value": "en-US",
"raw": "\"en-US\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 60,
"end": 98,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 66,
"end": 97,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 66,
"end": 70,
"ctxt": 0
},
"value": "deDE",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 73,
"end": 97,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 77,
"end": 88,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 77,
"end": 81,
"ctxt": 0
},
"value": "Intl",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"value": "Locale",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 89,
"end": 96,
"ctxt": 0
},
"value": "de-DE",
"raw": "\"de-DE\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 99,
"end": 137,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 105,
"end": 136,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 105,
"end": 109,
"ctxt": 0
},
"value": "jaJP",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 112,
"end": 136,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 116,
"end": 127,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 116,
"end": 120,
"ctxt": 0
},
"value": "Intl",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 121,
"end": 127,
"ctxt": 0
},
"value": "Locale",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 128,
"end": 135,
"ctxt": 0
},
"value": "ja-JP",
"raw": "\"ja-JP\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 139,
"end": 162,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 145,
"end": 161,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 145,
"end": 148,
"ctxt": 0
},
"value": "now",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 151,
"end": 161,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 155,
"end": 159,
"ctxt": 0
},
"value": "Date",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 163,
"end": 180,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 169,
"end": 179,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 169,
"end": 172,
"ctxt": 0
},
"value": "num",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 175,
"end": 179,
"ctxt": 0
},
"value": 1000.0,
"raw": "1000"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 181,
"end": 216,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 187,
"end": 215,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 187,
"end": 193,
"ctxt": 0
},
"value": "bigint",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BigIntLiteral",
"span": {
"start": 196,
"end": 215,
"ctxt": 0
},
"value": [
1,
[
2899336981,
28744523
]
],
"raw": "123456789123456789n"
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 218,
"end": 243,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 218,
"end": 242,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 218,
"end": 236,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 218,
"end": 221,
"ctxt": 0
},
"value": "now",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 222,
"end": 236,
"ctxt": 0
},
"value": "toLocaleString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 237,
"end": 241,
"ctxt": 0
},
"value": "enUS",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 244,
"end": 273,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 244,
"end": 272,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 244,
"end": 266,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 244,
"end": 247,
"ctxt": 0
},
"value": "now",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 248,
"end": 266,
"ctxt": 0
},
"value": "toLocaleDateString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 267,
"end": 271,
"ctxt": 0
},
"value": "enUS",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 274,
"end": 303,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 274,
"end": 302,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 274,
"end": 296,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 274,
"end": 277,
"ctxt": 0
},
"value": "now",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 278,
"end": 296,
"ctxt": 0
},
"value": "toLocaleTimeString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 297,
"end": 301,
"ctxt": 0
},
"value": "enUS",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 304,
"end": 337,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 304,
"end": 336,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 304,
"end": 322,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 304,
"end": 307,
"ctxt": 0
},
"value": "now",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 308,
"end": 322,
"ctxt": 0
},
"value": "toLocaleString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 323,
"end": 335,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 324,
"end": 328,
"ctxt": 0
},
"value": "deDE",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 330,
"end": 334,
"ctxt": 0
},
"value": "jaJP",
"optional": false
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 338,
"end": 375,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 338,
"end": 374,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 338,
"end": 360,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 338,
"end": 341,
"ctxt": 0
},
"value": "now",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 342,
"end": 360,
"ctxt": 0
},
"value": "toLocaleDateString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 361,
"end": 373,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 362,
"end": 366,
"ctxt": 0
},
"value": "deDE",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 368,
"end": 372,
"ctxt": 0
},
"value": "jaJP",
"optional": false
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 376,
"end": 413,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 376,
"end": 412,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 376,
"end": 398,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 376,
"end": 379,
"ctxt": 0
},
"value": "now",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 380,
"end": 398,
"ctxt": 0
},
"value": "toLocaleTimeString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 399,
"end": 411,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 400,
"end": 404,
"ctxt": 0
},
"value": "deDE",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 406,
"end": 410,
"ctxt": 0
},
"value": "jaJP",
"optional": false
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 415,
"end": 440,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 415,
"end": 439,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 415,
"end": 433,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 415,
"end": 418,
"ctxt": 0
},
"value": "num",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 419,
"end": 433,
"ctxt": 0
},
"value": "toLocaleString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 434,
"end": 438,
"ctxt": 0
},
"value": "enUS",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 441,
"end": 474,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 441,
"end": 473,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 441,
"end": 459,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 441,
"end": 444,
"ctxt": 0
},
"value": "num",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 445,
"end": 459,
"ctxt": 0
},
"value": "toLocaleString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 460,
"end": 472,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 461,
"end": 465,
"ctxt": 0
},
"value": "deDE",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 467,
"end": 471,
"ctxt": 0
},
"value": "jaJP",
"optional": false
}
}
]
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 476,
"end": 504,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 476,
"end": 503,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 476,
"end": 497,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 476,
"end": 482,
"ctxt": 0
},
"value": "bigint",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 483,
"end": 497,
"ctxt": 0
},
"value": "toLocaleString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 498,
"end": 502,
"ctxt": 0
},
"value": "enUS",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 505,
"end": 541,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 505,
"end": 540,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 505,
"end": 526,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 505,
"end": 511,
"ctxt": 0
},
"value": "bigint",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 512,
"end": 526,
"ctxt": 0
},
"value": "toLocaleString",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 527,
"end": 539,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 528,
"end": 532,
"ctxt": 0
},
"value": "deDE",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 534,
"end": 538,
"ctxt": 0
},
"value": "jaJP",
"optional": false
}
}
]
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}