{ "type": "Program", "statements": [ { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "I2v", "decorators": [], "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 16, "column": 9 } } }, "typeAnnotation": { "type": "ETSFunctionType", "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "i", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 16, "column": 19 } } }, "decorators": [], "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 19 } } }, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 19 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 28 } } }, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 28 } } }, "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 17, "column": 5 } } }, { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "T1", "decorators": [], "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 8 } } }, "typeAnnotation": { "type": "ETSFunctionType", "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "lambda", "typeAnnotation": { "type": "ETSFunctionType", "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "arg", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 17, "column": 29 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 29 } } }, "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 29 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 17, "column": 34 }, "end": { "line": 17, "column": 37 } } }, "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 37 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 37 } } }, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 37 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "arg", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 17, "column": 44 }, "end": { "line": 17, "column": 47 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 17, "column": 47 } } }, "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 17, "column": 47 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 17, "column": 52 }, "end": { "line": 17, "column": 55 } } }, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 55 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 18, "column": 5 } } }, { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "T2", "decorators": [], "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 8 } } }, "typeAnnotation": { "type": "ETSFunctionType", "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "c", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 18, "column": 18 } } }, "decorators": [], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 18 } } }, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 18 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 26 } } }, "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 26 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 20, "column": 6 } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "ETSGLOBAL", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "superClass": null, "implements": [], "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "ClassProperty", "key": { "type": "Identifier", "name": "F1", "decorators": [], "loc": { "start": { "line": 20, "column": 7 }, "end": { "line": 20, "column": 9 } } }, "value": { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "counter", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 20, "column": 27 }, "end": { "line": 20, "column": 30 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 18 }, "end": { "line": 20, "column": 30 } } }, "loc": { "start": { "line": 20, "column": 18 }, "end": { "line": 20, "column": 30 } } } ], "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "funcWithLambda", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T1", "decorators": [], "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 27 } } }, "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 29 } } }, "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 29 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 23 } } }, "init": { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "lambda", "typeAnnotation": { "type": "ETSFunctionType", "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "arg", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 21, "column": 45 }, "end": { "line": 21, "column": 48 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 40 }, "end": { "line": 21, "column": 48 } } }, "loc": { "start": { "line": 21, "column": 40 }, "end": { "line": 21, "column": 48 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 21, "column": 53 }, "end": { "line": 21, "column": 56 } } }, "loc": { "start": { "line": 21, "column": 39 }, "end": { "line": 21, "column": 56 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 31 }, "end": { "line": 21, "column": 56 } } }, "loc": { "start": { "line": 21, "column": 31 }, "end": { "line": 21, "column": 56 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "arg", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 21, "column": 63 }, "end": { "line": 21, "column": 66 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 58 }, "end": { "line": 21, "column": 66 } } }, "loc": { "start": { "line": 21, "column": 58 }, "end": { "line": 21, "column": 66 } } } ], "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "lambda", "decorators": [], "loc": { "start": { "line": 21, "column": 80 }, "end": { "line": 21, "column": 86 } } }, "arguments": [ { "type": "Identifier", "name": "arg", "decorators": [], "loc": { "start": { "line": 21, "column": 87 }, "end": { "line": 21, "column": 90 } } } ], "optional": false, "loc": { "start": { "line": 21, "column": 80 }, "end": { "line": 21, "column": 91 } } }, "loc": { "start": { "line": 21, "column": 73 }, "end": { "line": 21, "column": 91 } } } ], "loc": { "start": { "line": 21, "column": 71 }, "end": { "line": 21, "column": 93 } } }, "loc": { "start": { "line": 21, "column": 30 }, "end": { "line": 21, "column": 93 } } }, "loc": { "start": { "line": 21, "column": 30 }, "end": { "line": 21, "column": 93 } } }, "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 93 } } } ], "kind": "let", "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 93 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "it", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T2", "decorators": [], "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 15 } } }, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 17 } } }, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 17 } } }, "decorators": [], "loc": { "start": { "line": 22, "column": 9 }, "end": { "line": 22, "column": 11 } } }, "init": { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "c", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 22, "column": 22 }, "end": { "line": 22, "column": 25 } } }, "decorators": [], "loc": { "start": { "line": 22, "column": 19 }, "end": { "line": 22, "column": 25 } } }, "loc": { "start": { "line": 22, "column": 19 }, "end": { "line": 22, "column": 25 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 22, "column": 28 }, "end": { "line": 22, "column": 31 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 22, "column": 43 }, "end": { "line": 22, "column": 44 } } }, "loc": { "start": { "line": 22, "column": 36 }, "end": { "line": 22, "column": 44 } } } ], "loc": { "start": { "line": 22, "column": 35 }, "end": { "line": 22, "column": 45 } } }, "loc": { "start": { "line": 22, "column": 18 }, "end": { "line": 22, "column": 45 } } }, "loc": { "start": { "line": 22, "column": 18 }, "end": { "line": 22, "column": 45 } } }, "loc": { "start": { "line": 22, "column": 9 }, "end": { "line": 22, "column": 45 } } } ], "kind": "let", "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 22, "column": 45 } } }, { "type": "WhileStatement", "test": { "type": "BinaryExpression", "operator": ">", "left": { "type": "Identifier", "name": "counter", "decorators": [], "loc": { "start": { "line": 24, "column": 12 }, "end": { "line": 24, "column": 19 } } }, "right": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 24, "column": 22 }, "end": { "line": 24, "column": 23 } } }, "loc": { "start": { "line": 24, "column": 12 }, "end": { "line": 24, "column": 23 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "counter", "decorators": [], "loc": { "start": { "line": 24, "column": 25 }, "end": { "line": 24, "column": 32 } } }, "right": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "funcWithLambda", "decorators": [], "loc": { "start": { "line": 24, "column": 35 }, "end": { "line": 24, "column": 49 } } }, "arguments": [ { "type": "Identifier", "name": "it", "decorators": [], "loc": { "start": { "line": 24, "column": 50 }, "end": { "line": 24, "column": 52 } } }, { "type": "Identifier", "name": "counter", "decorators": [], "loc": { "start": { "line": 24, "column": 54 }, "end": { "line": 24, "column": 61 } } } ], "optional": false, "loc": { "start": { "line": 24, "column": 35 }, "end": { "line": 24, "column": 62 } } }, "loc": { "start": { "line": 24, "column": 25 }, "end": { "line": 24, "column": 62 } } }, "loc": { "start": { "line": 24, "column": 25 }, "end": { "line": 24, "column": 62 } } }, "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 62 } } } ], "loc": { "start": { "line": 20, "column": 35 }, "end": { "line": 25, "column": 2 } } }, "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 25, "column": 2 } } }, "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 25, "column": 2 } } }, "accessibility": "public", "static": true, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "I2v", "decorators": [], "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 14 } } }, "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 16 } } }, "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 16 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 20, "column": 7 }, "end": { "line": 25, "column": 2 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 27, "column": 10 }, "end": { "line": 27, "column": 14 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 27, "column": 10 }, "end": { "line": 27, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "F1", "decorators": [], "loc": { "start": { "line": 28, "column": 5 }, "end": { "line": 28, "column": 7 } } }, "arguments": [ { "type": "NumberLiteral", "value": 44, "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 28, "column": 10 } } } ], "optional": false, "loc": { "start": { "line": 28, "column": 5 }, "end": { "line": 28, "column": 11 } } }, "loc": { "start": { "line": 28, "column": 5 }, "end": { "line": 28, "column": 11 } } }, { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 29, "column": 12 }, "end": { "line": 29, "column": 13 } } }, "loc": { "start": { "line": 29, "column": 5 }, "end": { "line": 29, "column": 14 } } } ], "loc": { "start": { "line": 27, "column": 17 }, "end": { "line": 30, "column": 2 } } }, "loc": { "start": { "line": 27, "column": 14 }, "end": { "line": 30, "column": 2 } } }, "loc": { "start": { "line": 27, "column": 14 }, "end": { "line": 30, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 27, "column": 1 }, "end": { "line": 30, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 31, "column": 1 } } }