{ "type": "Program", "statements": [ { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "CIterator", "decorators": [], "loc": { "start": { "line": 16, "column": 15 }, "end": { "line": 16, "column": 24 } } }, "superClass": null, "implements": [ { "type": "TSClassImplements", "expression": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Iterator", "decorators": [], "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 44 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [], "loc": { "start": { "line": 16, "column": 45 }, "end": { "line": 16, "column": 51 } } }, "loc": { "start": { "line": 16, "column": 45 }, "end": { "line": 16, "column": 52 } } }, "loc": { "start": { "line": 16, "column": 45 }, "end": { "line": 16, "column": 52 } } } ], "loc": { "start": { "line": 16, "column": 44 }, "end": { "line": 16, "column": 52 } } }, "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 54 } } }, "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 54 } } }, "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 54 } } } ], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "ind_", "decorators": [], "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 15 } } }, "accessibility": "private", "static": false, "readonly": false, "declare": true, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 18, "column": 20 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 20 } } }, { "type": "ClassProperty", "key": { "type": "Identifier", "name": "base_", "decorators": [], "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 16 } } }, "accessibility": "private", "static": false, "readonly": false, "declare": true, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "C", "decorators": [], "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 19 } } }, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 20 } } }, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 20 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 20 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "kind": "constructor", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "base", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "C", "decorators": [], "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 23 } } }, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 24 } } }, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 24 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 16 }, "end": { "line": 21, "column": 24 } } }, "loc": { "start": { "line": 21, "column": 16 }, "end": { "line": 21, "column": 24 } } } ], "declare": true, "loc": { "start": { "line": 21, "column": 15 }, "end": { "line": 21, "column": 15 } } }, "loc": { "start": { "line": 21, "column": 15 }, "end": { "line": 21, "column": 15 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 21, "column": 3 }, "end": { "line": 21, "column": 15 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "next", "decorators": [], "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 16 } } }, "kind": "method", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "next", "decorators": [], "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 16 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "IteratorResult", "decorators": [], "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 23, "column": 34 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [], "loc": { "start": { "line": 23, "column": 35 }, "end": { "line": 23, "column": 41 } } }, "loc": { "start": { "line": 23, "column": 35 }, "end": { "line": 23, "column": 42 } } }, "loc": { "start": { "line": 23, "column": 35 }, "end": { "line": 23, "column": 42 } } } ], "loc": { "start": { "line": 23, "column": 34 }, "end": { "line": 23, "column": 42 } } }, "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 24, "column": 2 } } }, "declare": true, "loc": { "start": { "line": 23, "column": 16 }, "end": { "line": 23, "column": 16 } } }, "loc": { "start": { "line": 23, "column": 16 }, "end": { "line": 23, "column": 16 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 23, "column": 3 }, "end": { "line": 23, "column": 16 } } } ], "loc": { "start": { "line": 16, "column": 53 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 16, "column": 9 }, "end": { "line": 24, "column": 2 } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "C", "decorators": [], "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 26, "column": 16 } } }, "superClass": null, "implements": [], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "y", "decorators": [], "loc": { "start": { "line": 27, "column": 11 }, "end": { "line": 27, "column": 12 } } }, "accessibility": "private", "static": false, "readonly": false, "declare": true, "optional": false, "computed": false, "typeAnnotation": { "type": "TSArrayType", "elementType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [], "loc": { "start": { "line": 27, "column": 14 }, "end": { "line": 27, "column": 20 } } }, "loc": { "start": { "line": 27, "column": 14 }, "end": { "line": 27, "column": 21 } } }, "loc": { "start": { "line": 27, "column": 14 }, "end": { "line": 27, "column": 21 } } }, "loc": { "start": { "line": 27, "column": 22 }, "end": { "line": 27, "column": 23 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 27, "column": 11 }, "end": { "line": 27, "column": 23 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "$_iterator", "decorators": [], "loc": { "start": { "line": 29, "column": 19 }, "end": { "line": 29, "column": 20 } } }, "kind": "method", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "$_iterator", "decorators": [], "loc": { "start": { "line": 29, "column": 19 }, "end": { "line": 29, "column": 20 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "CIterator", "decorators": [], "loc": { "start": { "line": 29, "column": 24 }, "end": { "line": 29, "column": 33 } } }, "loc": { "start": { "line": 29, "column": 24 }, "end": { "line": 30, "column": 2 } } }, "loc": { "start": { "line": 29, "column": 24 }, "end": { "line": 30, "column": 2 } } }, "declare": true, "loc": { "start": { "line": 29, "column": 20 }, "end": { "line": 29, "column": 20 } } }, "loc": { "start": { "line": 29, "column": 20 }, "end": { "line": 29, "column": 20 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 29, "column": 3 }, "end": { "line": 29, "column": 20 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "kind": "constructor", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "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": 30, "column": 2 }, "end": { "line": 30, "column": 2 } } } ], "loc": { "start": { "line": 26, "column": 17 }, "end": { "line": 30, "column": 2 } } }, "loc": { "start": { "line": 26, "column": 9 }, "end": { "line": 30, "column": 2 } } }, { "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": "MethodDefinition", "key": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 32, "column": 10 }, "end": { "line": 32, "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": 32, "column": 10 }, "end": { "line": 32, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 32, "column": 18 }, "end": { "line": 32, "column": 22 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 34, "column": 7 }, "end": { "line": 34, "column": 8 } } }, "init": { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "C", "decorators": [], "loc": { "start": { "line": 34, "column": 15 }, "end": { "line": 34, "column": 16 } } }, "loc": { "start": { "line": 34, "column": 15 }, "end": { "line": 34, "column": 17 } } }, "loc": { "start": { "line": 34, "column": 15 }, "end": { "line": 34, "column": 17 } } }, "arguments": [], "loc": { "start": { "line": 34, "column": 11 }, "end": { "line": 34, "column": 19 } } }, "loc": { "start": { "line": 34, "column": 7 }, "end": { "line": 34, "column": 19 } } } ], "kind": "let", "loc": { "start": { "line": 34, "column": 3 }, "end": { "line": 34, "column": 19 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "i", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 35, "column": 10 }, "end": { "line": 35, "column": 13 } } }, "decorators": [], "loc": { "start": { "line": 35, "column": 7 }, "end": { "line": 35, "column": 8 } } }, "init": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 35, "column": 16 }, "end": { "line": 35, "column": 17 } } }, "loc": { "start": { "line": 35, "column": 7 }, "end": { "line": 35, "column": 17 } } } ], "kind": "let", "loc": { "start": { "line": 35, "column": 3 }, "end": { "line": 35, "column": 18 } } }, { "type": "ForOfStatement", "await": false, "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "it", "decorators": [], "loc": { "start": { "line": 37, "column": 12 }, "end": { "line": 37, "column": 14 } } }, "init": null, "loc": { "start": { "line": 37, "column": 12 }, "end": { "line": 37, "column": 14 } } } ], "kind": "let", "loc": { "start": { "line": 37, "column": 8 }, "end": { "line": 37, "column": 14 } } }, "right": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 37, "column": 18 }, "end": { "line": 37, "column": 19 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "+=", "left": { "type": "Identifier", "name": "it", "decorators": [], "loc": { "start": { "line": 38, "column": 5 }, "end": { "line": 38, "column": 7 } } }, "right": { "type": "StringLiteral", "value": ": in for", "loc": { "start": { "line": 38, "column": 11 }, "end": { "line": 38, "column": 21 } } }, "loc": { "start": { "line": 38, "column": 5 }, "end": { "line": 38, "column": 21 } } }, "loc": { "start": { "line": 38, "column": 5 }, "end": { "line": 38, "column": 22 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "i", "decorators": [], "loc": { "start": { "line": 40, "column": 9 }, "end": { "line": 40, "column": 10 } } }, "right": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 40, "column": 14 }, "end": { "line": 40, "column": 15 } } }, "loc": { "start": { "line": 40, "column": 9 }, "end": { "line": 40, "column": 15 } } }, "consequent": { "type": "BlockStatement", "statements": [ { "type": "AssertStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "it", "decorators": [], "loc": { "start": { "line": 41, "column": 15 }, "end": { "line": 41, "column": 17 } } }, "right": { "type": "StringLiteral", "value": "one: in for", "loc": { "start": { "line": 41, "column": 21 }, "end": { "line": 41, "column": 34 } } }, "loc": { "start": { "line": 41, "column": 14 }, "end": { "line": 41, "column": 35 } } }, "second": null, "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 36 } } } ], "loc": { "start": { "line": 40, "column": 17 }, "end": { "line": 42, "column": 6 } } }, "alternate": { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "i", "decorators": [], "loc": { "start": { "line": 42, "column": 16 }, "end": { "line": 42, "column": 17 } } }, "right": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 42, "column": 21 }, "end": { "line": 42, "column": 22 } } }, "loc": { "start": { "line": 42, "column": 16 }, "end": { "line": 42, "column": 22 } } }, "consequent": { "type": "BlockStatement", "statements": [ { "type": "AssertStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "it", "decorators": [], "loc": { "start": { "line": 43, "column": 15 }, "end": { "line": 43, "column": 17 } } }, "right": { "type": "StringLiteral", "value": "two: in for", "loc": { "start": { "line": 43, "column": 21 }, "end": { "line": 43, "column": 34 } } }, "loc": { "start": { "line": 43, "column": 14 }, "end": { "line": 43, "column": 35 } } }, "second": null, "loc": { "start": { "line": 43, "column": 8 }, "end": { "line": 43, "column": 35 } } } ], "loc": { "start": { "line": 42, "column": 24 }, "end": { "line": 44, "column": 6 } } }, "alternate": { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "i", "decorators": [], "loc": { "start": { "line": 44, "column": 16 }, "end": { "line": 44, "column": 17 } } }, "right": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 44, "column": 21 }, "end": { "line": 44, "column": 22 } } }, "loc": { "start": { "line": 44, "column": 16 }, "end": { "line": 44, "column": 22 } } }, "consequent": { "type": "BlockStatement", "statements": [ { "type": "AssertStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "it", "decorators": [], "loc": { "start": { "line": 45, "column": 15 }, "end": { "line": 45, "column": 17 } } }, "right": { "type": "StringLiteral", "value": "three: in for", "loc": { "start": { "line": 45, "column": 21 }, "end": { "line": 45, "column": 36 } } }, "loc": { "start": { "line": 45, "column": 14 }, "end": { "line": 45, "column": 37 } } }, "second": null, "loc": { "start": { "line": 45, "column": 8 }, "end": { "line": 45, "column": 37 } } } ], "loc": { "start": { "line": 44, "column": 24 }, "end": { "line": 46, "column": 6 } } }, "alternate": { "type": "BlockStatement", "statements": [ { "type": "AssertStatement", "test": { "type": "BooleanLiteral", "value": false, "loc": { "start": { "line": 47, "column": 14 }, "end": { "line": 47, "column": 21 } } }, "second": null, "loc": { "start": { "line": 47, "column": 8 }, "end": { "line": 47, "column": 22 } } } ], "loc": { "start": { "line": 46, "column": 12 }, "end": { "line": 48, "column": 6 } } }, "loc": { "start": { "line": 44, "column": 12 }, "end": { "line": 48, "column": 6 } } }, "loc": { "start": { "line": 42, "column": 12 }, "end": { "line": 48, "column": 6 } } }, "loc": { "start": { "line": 40, "column": 5 }, "end": { "line": 48, "column": 6 } } }, { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "prefix": true, "argument": { "type": "Identifier", "name": "i", "decorators": [], "loc": { "start": { "line": 50, "column": 7 }, "end": { "line": 50, "column": 8 } } }, "loc": { "start": { "line": 50, "column": 5 }, "end": { "line": 50, "column": 8 } } }, "loc": { "start": { "line": 50, "column": 5 }, "end": { "line": 50, "column": 9 } } } ], "loc": { "start": { "line": 37, "column": 21 }, "end": { "line": 51, "column": 4 } } }, "loc": { "start": { "line": 37, "column": 3 }, "end": { "line": 51, "column": 4 } } } ], "loc": { "start": { "line": 32, "column": 23 }, "end": { "line": 52, "column": 2 } } }, "loc": { "start": { "line": 32, "column": 14 }, "end": { "line": 52, "column": 2 } } }, "loc": { "start": { "line": 32, "column": 14 }, "end": { "line": 52, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 32, "column": 1 }, "end": { "line": 52, "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": 52, "column": 2 } } }