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

1258 lines
30 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 17,
"end": 2488,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 17,
"end": 36,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 21,
"end": 35,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 21,
"end": 25,
"ctxt": 0
},
"value": "oct1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 28,
"end": 35,
"ctxt": 0
},
"value": 19230.0,
"raw": "0o45436"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 37,
"end": 56,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 41,
"end": 55,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 41,
"end": 45,
"ctxt": 0
},
"value": "oct2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 48,
"end": 55,
"ctxt": 0
},
"value": 19230.0,
"raw": "0O45436"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 57,
"end": 645,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 61,
"end": 644,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 61,
"end": 65,
"ctxt": 0
},
"value": "oct3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 68,
"end": 644,
"ctxt": 0
},
"value": null,
"raw": "0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 646,
"end": 931,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 650,
"end": 930,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 650,
"end": 654,
"ctxt": 0
},
"value": "oct4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 657,
"end": 930,
"ctxt": 0
},
"value": 5.462437423415177e244,
"raw": "0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 933,
"end": 1596,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 937,
"end": 1596,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 937,
"end": 941,
"ctxt": 0
},
"value": "obj1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 944,
"end": 1596,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 950,
"end": 957,
"ctxt": 0
},
"value": 19230.0,
"raw": "0o45436"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 959,
"end": 966,
"ctxt": 0
},
"value": "Hello",
"raw": "\"Hello\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 972,
"end": 973,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 975,
"end": 982,
"ctxt": 0
},
"value": 19230.0,
"raw": "0o45436"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 989,
"end": 990,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 992,
"end": 996,
"ctxt": 0
},
"value": "oct1",
"optional": false
}
},
{
"type": "Identifier",
"span": {
"start": 1002,
"end": 1006,
"ctxt": 0
},
"value": "oct1",
"optional": false
},
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 1012,
"end": 1588,
"ctxt": 0
},
"value": null,
"raw": "0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777"
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 1590,
"end": 1594,
"ctxt": 0
},
"value": true
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1598,
"end": 1957,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1602,
"end": 1957,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1602,
"end": 1606,
"ctxt": 0
},
"value": "obj2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 1609,
"end": 1957,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 1615,
"end": 1622,
"ctxt": 0
},
"value": 19230.0,
"raw": "0O45436"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1624,
"end": 1628,
"ctxt": 0
},
"value": "hi",
"raw": "\"hi\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1634,
"end": 1635,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1637,
"end": 1644,
"ctxt": 0
},
"value": 19230.0,
"raw": "0O45436"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1651,
"end": 1652,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 1654,
"end": 1658,
"ctxt": 0
},
"value": "oct2",
"optional": false
}
},
{
"type": "Identifier",
"span": {
"start": 1664,
"end": 1668,
"ctxt": 0
},
"value": "oct2",
"optional": false
},
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 1674,
"end": 1947,
"ctxt": 0
},
"value": 5.462437423415177e244,
"raw": "0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777"
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 1949,
"end": 1954,
"ctxt": 0
},
"value": false
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1959,
"end": 1973,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 1959,
"end": 1972,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1959,
"end": 1963,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1963,
"end": 1972,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1964,
"end": 1971,
"ctxt": 0
},
"value": 19230.0,
"raw": "0o45436"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1988,
"end": 2004,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 1988,
"end": 2003,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1988,
"end": 1992,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1992,
"end": 2003,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1993,
"end": 2002,
"ctxt": 0
},
"value": "0o45436",
"raw": "\"0o45436\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2014,
"end": 2028,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2014,
"end": 2027,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2014,
"end": 2018,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2018,
"end": 2027,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2019,
"end": 2026,
"ctxt": 0
},
"value": "19230",
"raw": "\"19230\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2043,
"end": 2055,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2043,
"end": 2054,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2043,
"end": 2047,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2047,
"end": 2054,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 2048,
"end": 2053,
"ctxt": 0
},
"value": 19230.0,
"raw": "19230"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2072,
"end": 2082,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2072,
"end": 2081,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2072,
"end": 2076,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2076,
"end": 2081,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2077,
"end": 2080,
"ctxt": 0
},
"value": "a",
"raw": "\"a\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2101,
"end": 2111,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2101,
"end": 2110,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2101,
"end": 2105,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2105,
"end": 2110,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2106,
"end": 2109,
"ctxt": 0
},
"value": "b",
"raw": "\"b\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2130,
"end": 2143,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2130,
"end": 2142,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2130,
"end": 2134,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2134,
"end": 2142,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2135,
"end": 2141,
"ctxt": 0
},
"value": "oct1",
"raw": "\"oct1\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2159,
"end": 2176,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2159,
"end": 2175,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2159,
"end": 2163,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2163,
"end": 2175,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2164,
"end": 2174,
"ctxt": 0
},
"value": "Infinity",
"raw": "\"Infinity\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2190,
"end": 2204,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2190,
"end": 2203,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2190,
"end": 2194,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2194,
"end": 2203,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 2195,
"end": 2202,
"ctxt": 0
},
"value": 19230.0,
"raw": "0O45436"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2218,
"end": 2234,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2218,
"end": 2233,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2218,
"end": 2222,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2222,
"end": 2233,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2223,
"end": 2232,
"ctxt": 0
},
"value": "0O45436",
"raw": "\"0O45436\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2243,
"end": 2257,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2243,
"end": 2256,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2243,
"end": 2247,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2247,
"end": 2256,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2248,
"end": 2255,
"ctxt": 0
},
"value": "19230",
"raw": "\"19230\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2271,
"end": 2283,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2271,
"end": 2282,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2271,
"end": 2275,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2275,
"end": 2282,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 2276,
"end": 2281,
"ctxt": 0
},
"value": 19230.0,
"raw": "19230"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2299,
"end": 2309,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2299,
"end": 2308,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2299,
"end": 2303,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2303,
"end": 2308,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2304,
"end": 2307,
"ctxt": 0
},
"value": "a",
"raw": "\"a\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2327,
"end": 2337,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2327,
"end": 2336,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2327,
"end": 2331,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2331,
"end": 2336,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2332,
"end": 2335,
"ctxt": 0
},
"value": "b",
"raw": "\"b\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2355,
"end": 2368,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2355,
"end": 2367,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2355,
"end": 2359,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2359,
"end": 2367,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2360,
"end": 2366,
"ctxt": 0
},
"value": "oct2",
"raw": "\"oct2\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2383,
"end": 2412,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2383,
"end": 2411,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2383,
"end": 2387,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2387,
"end": 2411,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 2388,
"end": 2410,
"ctxt": 0
},
"value": 5.462437423415177e244,
"raw": "5.462437423415177e+244"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2427,
"end": 2458,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2427,
"end": 2457,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2427,
"end": 2431,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2431,
"end": 2457,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2432,
"end": 2456,
"ctxt": 0
},
"value": "5.462437423415177e+244",
"raw": "\"5.462437423415177e+244\""
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 2471,
"end": 2488,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2471,
"end": 2487,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2471,
"end": 2475,
"ctxt": 0
},
"value": "obj2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2475,
"end": 2487,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2476,
"end": 2486,
"ctxt": 0
},
"value": "Infinity",
"raw": "\"Infinity\""
}
}
}
}
],
"interpreter": null
}