mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
1667 lines
46 KiB
JSON
1667 lines
46 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 923,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 19,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 18,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 9,
|
|
"ctxt": 0
|
|
},
|
|
"value": "cond",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 9,
|
|
"end": 18,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 11,
|
|
"end": 18,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 29,
|
|
"end": 30,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 20,
|
|
"end": 142,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 33,
|
|
"end": 142,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 72,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 43,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 43,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 61,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 64,
|
|
"end": 71,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForStatement",
|
|
"span": {
|
|
"start": 77,
|
|
"end": 140,
|
|
"ctxt": 0
|
|
},
|
|
"init": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 82,
|
|
"end": 88,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 82,
|
|
"end": 83,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 86,
|
|
"end": 88,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
}
|
|
},
|
|
"test": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 90,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"value": "cond",
|
|
"optional": false
|
|
},
|
|
"update": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 96,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 96,
|
|
"end": 97,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 100,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"value": 5.0,
|
|
"raw": "5"
|
|
}
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 140,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 113,
|
|
"end": 115,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 113,
|
|
"end": 114,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 152,
|
|
"end": 153,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 143,
|
|
"end": 278,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 156,
|
|
"end": 278,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 162,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 166,
|
|
"end": 194,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 166,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 167,
|
|
"end": 194,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 169,
|
|
"end": 194,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 169,
|
|
"end": 175,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 178,
|
|
"end": 184,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 194,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForStatement",
|
|
"span": {
|
|
"start": 200,
|
|
"end": 276,
|
|
"ctxt": 0
|
|
},
|
|
"init": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 209,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"value": 5.0,
|
|
"raw": "5"
|
|
}
|
|
},
|
|
"test": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 212,
|
|
"end": 216,
|
|
"ctxt": 0
|
|
},
|
|
"value": "cond",
|
|
"optional": false
|
|
},
|
|
"update": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 218,
|
|
"end": 230,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 218,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 222,
|
|
"end": 230,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 222,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 224,
|
|
"end": 230,
|
|
"ctxt": 0
|
|
},
|
|
"value": "length",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 232,
|
|
"end": 276,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 242,
|
|
"end": 244,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 242,
|
|
"end": 243,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 263,
|
|
"end": 270,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 263,
|
|
"end": 269,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 263,
|
|
"end": 264,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 267,
|
|
"end": 269,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 288,
|
|
"end": 289,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 279,
|
|
"end": 408,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 292,
|
|
"end": 408,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 298,
|
|
"end": 331,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 302,
|
|
"end": 330,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 302,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 303,
|
|
"end": 330,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 305,
|
|
"end": 330,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 305,
|
|
"end": 311,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 314,
|
|
"end": 320,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 323,
|
|
"end": 330,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForStatement",
|
|
"span": {
|
|
"start": 336,
|
|
"end": 406,
|
|
"ctxt": 0
|
|
},
|
|
"init": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 341,
|
|
"end": 346,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 341,
|
|
"end": 342,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 345,
|
|
"end": 346,
|
|
"ctxt": 0
|
|
},
|
|
"value": 5.0,
|
|
"raw": "5"
|
|
}
|
|
},
|
|
"test": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 348,
|
|
"end": 369,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 348,
|
|
"end": 349,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 352,
|
|
"end": 369,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 352,
|
|
"end": 367,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 352,
|
|
"end": 353,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 354,
|
|
"end": 367,
|
|
"ctxt": 0
|
|
},
|
|
"value": "toExponential",
|
|
"optional": false
|
|
}
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
"update": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 371,
|
|
"end": 376,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 371,
|
|
"end": 372,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 375,
|
|
"end": 376,
|
|
"ctxt": 0
|
|
},
|
|
"value": 5.0,
|
|
"raw": "5"
|
|
}
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 378,
|
|
"end": 406,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 388,
|
|
"end": 390,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 388,
|
|
"end": 389,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 418,
|
|
"end": 419,
|
|
"ctxt": 0
|
|
},
|
|
"value": "d",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 409,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 422,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 428,
|
|
"end": 461,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 432,
|
|
"end": 460,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 432,
|
|
"end": 433,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 433,
|
|
"end": 460,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 435,
|
|
"end": 460,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 435,
|
|
"end": 441,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 444,
|
|
"end": 450,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 453,
|
|
"end": 460,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForStatement",
|
|
"span": {
|
|
"start": 466,
|
|
"end": 537,
|
|
"ctxt": 0
|
|
},
|
|
"init": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 471,
|
|
"end": 477,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 471,
|
|
"end": 472,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 475,
|
|
"end": 477,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
}
|
|
},
|
|
"test": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 479,
|
|
"end": 500,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "===",
|
|
"left": {
|
|
"type": "UnaryExpression",
|
|
"span": {
|
|
"start": 479,
|
|
"end": 487,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "typeof",
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 486,
|
|
"end": 487,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 492,
|
|
"end": 500,
|
|
"ctxt": 0
|
|
},
|
|
"value": "string",
|
|
"raw": "\"string\""
|
|
}
|
|
},
|
|
"update": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 502,
|
|
"end": 507,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 502,
|
|
"end": 503,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 506,
|
|
"end": 507,
|
|
"ctxt": 0
|
|
},
|
|
"value": 5.0,
|
|
"raw": "5"
|
|
}
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 509,
|
|
"end": 537,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 519,
|
|
"end": 521,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 519,
|
|
"end": 520,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 549,
|
|
"end": 550,
|
|
"ctxt": 0
|
|
},
|
|
"value": "e",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 540,
|
|
"end": 703,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 553,
|
|
"end": 703,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 559,
|
|
"end": 601,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 563,
|
|
"end": 600,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 563,
|
|
"end": 564,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 564,
|
|
"end": 600,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 566,
|
|
"end": 600,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 566,
|
|
"end": 572,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 575,
|
|
"end": 581,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 584,
|
|
"end": 591,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
},
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 594,
|
|
"end": 600,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 594,
|
|
"end": 600,
|
|
"ctxt": 0
|
|
},
|
|
"value": "RegExp",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForStatement",
|
|
"span": {
|
|
"start": 606,
|
|
"end": 701,
|
|
"ctxt": 0
|
|
},
|
|
"init": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 611,
|
|
"end": 622,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 611,
|
|
"end": 612,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 615,
|
|
"end": 622,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "||",
|
|
"left": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 615,
|
|
"end": 617,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 621,
|
|
"end": 622,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
}
|
|
}
|
|
},
|
|
"test": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 624,
|
|
"end": 645,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "!==",
|
|
"left": {
|
|
"type": "UnaryExpression",
|
|
"span": {
|
|
"start": 624,
|
|
"end": 632,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "typeof",
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 631,
|
|
"end": 632,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 637,
|
|
"end": 645,
|
|
"ctxt": 0
|
|
},
|
|
"value": "string",
|
|
"raw": "\"string\""
|
|
}
|
|
},
|
|
"update": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 647,
|
|
"end": 661,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 647,
|
|
"end": 648,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 651,
|
|
"end": 661,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "||",
|
|
"left": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 651,
|
|
"end": 653,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "\"\""
|
|
},
|
|
"right": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 657,
|
|
"end": 661,
|
|
"ctxt": 0
|
|
},
|
|
"value": true
|
|
}
|
|
}
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 663,
|
|
"end": 701,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 673,
|
|
"end": 675,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 673,
|
|
"end": 674,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 713,
|
|
"end": 714,
|
|
"ctxt": 0
|
|
},
|
|
"value": "f",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 704,
|
|
"end": 923,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 717,
|
|
"end": 923,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 723,
|
|
"end": 756,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 727,
|
|
"end": 755,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 727,
|
|
"end": 728,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 728,
|
|
"end": 755,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 730,
|
|
"end": 755,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 730,
|
|
"end": 736,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 739,
|
|
"end": 745,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 748,
|
|
"end": 755,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ForStatement",
|
|
"span": {
|
|
"start": 761,
|
|
"end": 895,
|
|
"ctxt": 0
|
|
},
|
|
"init": null,
|
|
"test": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 768,
|
|
"end": 789,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "!==",
|
|
"left": {
|
|
"type": "UnaryExpression",
|
|
"span": {
|
|
"start": 768,
|
|
"end": 776,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "typeof",
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 775,
|
|
"end": 776,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 781,
|
|
"end": 789,
|
|
"ctxt": 0
|
|
},
|
|
"value": "string",
|
|
"raw": "\"string\""
|
|
}
|
|
},
|
|
"update": null,
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 792,
|
|
"end": 895,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 802,
|
|
"end": 804,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 802,
|
|
"end": 803,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
{
|
|
"type": "IfStatement",
|
|
"span": {
|
|
"start": 833,
|
|
"end": 866,
|
|
"ctxt": 0
|
|
},
|
|
"test": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 837,
|
|
"end": 858,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "===",
|
|
"left": {
|
|
"type": "UnaryExpression",
|
|
"span": {
|
|
"start": 837,
|
|
"end": 845,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "typeof",
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 844,
|
|
"end": 845,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 850,
|
|
"end": 858,
|
|
"ctxt": 0
|
|
},
|
|
"value": "number",
|
|
"raw": "\"number\""
|
|
}
|
|
},
|
|
"consequent": {
|
|
"type": "BreakStatement",
|
|
"span": {
|
|
"start": 860,
|
|
"end": 866,
|
|
"ctxt": 0
|
|
},
|
|
"label": null
|
|
},
|
|
"alternate": null
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 875,
|
|
"end": 889,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 875,
|
|
"end": 888,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 875,
|
|
"end": 876,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 879,
|
|
"end": 888,
|
|
"ctxt": 0
|
|
},
|
|
"value": "undefined",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 900,
|
|
"end": 902,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 900,
|
|
"end": 901,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|