{ "type": "Program", "statements": [ { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "TreeNode", "decorators": [], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 15 } } }, "superClass": null, "implements": [], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "left", "decorators": [], "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 15 } } }, "accessibility": "private", "static": false, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "TreeNode", "decorators": [], "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 25 } } }, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 27 } } }, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 27 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 32 } } } ], "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 32 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 32 } } }, { "type": "ClassProperty", "key": { "type": "Identifier", "name": "right", "decorators": [], "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 16 } } }, "accessibility": "private", "static": false, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "TreeNode", "decorators": [], "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 26 } } }, "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 28 } } }, "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 28 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 18, "column": 29 }, "end": { "line": 18, "column": 33 } } } ], "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 33 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 33 } } }, { "type": "ClassProperty", "key": { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 15 } } }, "accessibility": "private", "static": false, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 19, "column": 17 }, "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": "left", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "TreeNode", "decorators": [], "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 29 } } }, "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 31 } } }, "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 31 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 21, "column": 32 }, "end": { "line": 21, "column": 36 } } } ], "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 36 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 15 }, "end": { "line": 21, "column": 36 } } }, "loc": { "start": { "line": 21, "column": 15 }, "end": { "line": 21, "column": 36 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "right", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "TreeNode", "decorators": [], "loc": { "start": { "line": 21, "column": 45 }, "end": { "line": 21, "column": 53 } } }, "loc": { "start": { "line": 21, "column": 45 }, "end": { "line": 21, "column": 55 } } }, "loc": { "start": { "line": 21, "column": 45 }, "end": { "line": 21, "column": 55 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 21, "column": 56 }, "end": { "line": 21, "column": 60 } } } ], "loc": { "start": { "line": 21, "column": 45 }, "end": { "line": 21, "column": 60 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 38 }, "end": { "line": 21, "column": 60 } } }, "loc": { "start": { "line": 21, "column": 38 }, "end": { "line": 21, "column": 60 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "item", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 21, "column": 68 }, "end": { "line": 21, "column": 71 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 62 }, "end": { "line": 21, "column": 71 } } }, "loc": { "start": { "line": 21, "column": 62 }, "end": { "line": 21, "column": 71 } } } ], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 22, "column": 9 } } }, "property": { "type": "Identifier", "name": "left", "decorators": [], "loc": { "start": { "line": 22, "column": 10 }, "end": { "line": 22, "column": 14 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 22, "column": 14 } } }, "right": { "type": "Identifier", "name": "left", "decorators": [], "loc": { "start": { "line": 22, "column": 17 }, "end": { "line": 22, "column": 21 } } }, "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 22, "column": 21 } } }, "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 22, "column": 22 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 23, "column": 5 }, "end": { "line": 23, "column": 9 } } }, "property": { "type": "Identifier", "name": "right", "decorators": [], "loc": { "start": { "line": 23, "column": 10 }, "end": { "line": 23, "column": 15 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 23, "column": 5 }, "end": { "line": 23, "column": 15 } } }, "right": { "type": "Identifier", "name": "right", "decorators": [], "loc": { "start": { "line": 23, "column": 18 }, "end": { "line": 23, "column": 23 } } }, "loc": { "start": { "line": 23, "column": 5 }, "end": { "line": 23, "column": 23 } } }, "loc": { "start": { "line": 23, "column": 5 }, "end": { "line": 23, "column": 24 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 9 } } }, "property": { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 24, "column": 10 }, "end": { "line": 24, "column": 14 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 14 } } }, "right": { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 24, "column": 17 }, "end": { "line": 24, "column": 21 } } }, "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 21 } } }, "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 22 } } } ], "loc": { "start": { "line": 21, "column": 73 }, "end": { "line": 25, "column": 4 } } }, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 25, "column": 4 } } }, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 25, "column": 4 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 21, "column": 3 }, "end": { "line": 25, "column": 4 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "itemCheck", "decorators": [], "loc": { "start": { "line": 27, "column": 10 }, "end": { "line": 27, "column": 19 } } }, "kind": "method", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "itemCheck", "decorators": [], "loc": { "start": { "line": 27, "column": 10 }, "end": { "line": 27, "column": 19 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 27, "column": 23 }, "end": { "line": 27, "column": 26 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 28, "column": 9 }, "end": { "line": 28, "column": 13 } } }, "property": { "type": "Identifier", "name": "left", "decorators": [], "loc": { "start": { "line": 28, "column": 14 }, "end": { "line": 28, "column": 18 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 28, "column": 9 }, "end": { "line": 28, "column": 18 } } }, "right": { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 28, "column": 22 }, "end": { "line": 28, "column": 26 } } }, "loc": { "start": { "line": 28, "column": 9 }, "end": { "line": 28, "column": 26 } } }, "consequent": { "type": "ReturnStatement", "argument": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 29, "column": 14 }, "end": { "line": 29, "column": 18 } } }, "property": { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 29, "column": 19 }, "end": { "line": 29, "column": 23 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 29, "column": 14 }, "end": { "line": 29, "column": 23 } } }, "loc": { "start": { "line": 29, "column": 7 }, "end": { "line": 29, "column": 24 } } }, "alternate": { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "-", "left": { "type": "BinaryExpression", "operator": "+", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 31, "column": 14 }, "end": { "line": 31, "column": 18 } } }, "property": { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 31, "column": 19 }, "end": { "line": 31, "column": 23 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 31, "column": 14 }, "end": { "line": 31, "column": 23 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "TSNonNullExpression", "expression": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 31, "column": 26 }, "end": { "line": 31, "column": 30 } } }, "property": { "type": "Identifier", "name": "left", "decorators": [], "loc": { "start": { "line": 31, "column": 31 }, "end": { "line": 31, "column": 35 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 31, "column": 26 }, "end": { "line": 31, "column": 35 } } }, "loc": { "start": { "line": 31, "column": 26 }, "end": { "line": 31, "column": 36 } } }, "property": { "type": "Identifier", "name": "itemCheck", "decorators": [], "loc": { "start": { "line": 31, "column": 37 }, "end": { "line": 31, "column": 46 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 31, "column": 26 }, "end": { "line": 31, "column": 46 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 31, "column": 26 }, "end": { "line": 31, "column": 48 } } }, "loc": { "start": { "line": 31, "column": 14 }, "end": { "line": 31, "column": 48 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "TSNonNullExpression", "expression": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 31, "column": 51 }, "end": { "line": 31, "column": 55 } } }, "property": { "type": "Identifier", "name": "right", "decorators": [], "loc": { "start": { "line": 31, "column": 56 }, "end": { "line": 31, "column": 61 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 31, "column": 51 }, "end": { "line": 31, "column": 61 } } }, "loc": { "start": { "line": 31, "column": 51 }, "end": { "line": 31, "column": 62 } } }, "property": { "type": "Identifier", "name": "itemCheck", "decorators": [], "loc": { "start": { "line": 31, "column": 63 }, "end": { "line": 31, "column": 72 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 31, "column": 51 }, "end": { "line": 31, "column": 72 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 31, "column": 51 }, "end": { "line": 31, "column": 74 } } }, "loc": { "start": { "line": 31, "column": 14 }, "end": { "line": 31, "column": 74 } } }, "loc": { "start": { "line": 31, "column": 7 }, "end": { "line": 31, "column": 75 } } }, "loc": { "start": { "line": 28, "column": 5 }, "end": { "line": 31, "column": 75 } } } ], "loc": { "start": { "line": 27, "column": 27 }, "end": { "line": 32, "column": 4 } } }, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 32, "column": 4 } } }, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 32, "column": 4 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 27, "column": 3 }, "end": { "line": 32, "column": 4 } } } ], "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 33, "column": 2 } } }, "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 33, "column": 2 } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 35, "column": 14 }, "end": { "line": 35, "column": 31 } } }, "superClass": null, "implements": [], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "startDepth", "decorators": [], "loc": { "start": { "line": 36, "column": 19 }, "end": { "line": 36, "column": 29 } } }, "value": { "type": "NumberLiteral", "value": 4, "loc": { "start": { "line": 36, "column": 32 }, "end": { "line": 36, "column": 33 } } }, "accessibility": "public", "static": true, "readonly": true, "declare": false, "optional": false, "computed": false, "definite": false, "decorators": [], "loc": { "start": { "line": 36, "column": 19 }, "end": { "line": 36, "column": 33 } } }, { "type": "ClassProperty", "key": { "type": "Identifier", "name": "endDepth", "decorators": [], "loc": { "start": { "line": 37, "column": 19 }, "end": { "line": 37, "column": 27 } } }, "value": { "type": "NumberLiteral", "value": 7, "loc": { "start": { "line": 37, "column": 30 }, "end": { "line": 37, "column": 31 } } }, "accessibility": "public", "static": true, "readonly": true, "declare": false, "optional": false, "computed": false, "definite": false, "decorators": [], "loc": { "start": { "line": 37, "column": 19 }, "end": { "line": 37, "column": 31 } } }, { "type": "ClassProperty", "key": { "type": "Identifier", "name": "expected", "decorators": [], "loc": { "start": { "line": 38, "column": 19 }, "end": { "line": 38, "column": 27 } } }, "value": { "type": "UnaryExpression", "operator": "-", "prefix": true, "argument": { "type": "NumberLiteral", "value": 4, "loc": { "start": { "line": 38, "column": 31 }, "end": { "line": 38, "column": 32 } } }, "loc": { "start": { "line": 38, "column": 30 }, "end": { "line": 38, "column": 32 } } }, "accessibility": "public", "static": true, "readonly": true, "declare": false, "optional": false, "computed": false, "definite": false, "decorators": [], "loc": { "start": { "line": 38, "column": 19 }, "end": { "line": 38, "column": 32 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "bottomUpTree", "decorators": [], "loc": { "start": { "line": 40, "column": 10 }, "end": { "line": 40, "column": 22 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "bottomUpTree", "decorators": [], "loc": { "start": { "line": 40, "column": 10 }, "end": { "line": 40, "column": 22 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "item", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 40, "column": 29 }, "end": { "line": 40, "column": 32 } } }, "decorators": [], "loc": { "start": { "line": 40, "column": 23 }, "end": { "line": 40, "column": 32 } } }, "loc": { "start": { "line": 40, "column": 23 }, "end": { "line": 40, "column": 32 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "depth", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 40, "column": 41 }, "end": { "line": 40, "column": 44 } } }, "decorators": [], "loc": { "start": { "line": 40, "column": 34 }, "end": { "line": 40, "column": 44 } } }, "loc": { "start": { "line": 40, "column": 34 }, "end": { "line": 40, "column": 44 } } } ], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "TreeNode", "decorators": [], "loc": { "start": { "line": 40, "column": 47 }, "end": { "line": 40, "column": 55 } } }, "loc": { "start": { "line": 40, "column": 47 }, "end": { "line": 40, "column": 57 } } }, "loc": { "start": { "line": 40, "column": 47 }, "end": { "line": 40, "column": 57 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": ">", "left": { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 13 } } }, "right": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 41, "column": 16 }, "end": { "line": 41, "column": 17 } } }, "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 17 } } }, "consequent": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "TreeNode", "decorators": [], "loc": { "start": { "line": 42, "column": 17 }, "end": { "line": 42, "column": 25 } } }, "loc": { "start": { "line": 42, "column": 17 }, "end": { "line": 42, "column": 26 } } }, "loc": { "start": { "line": 42, "column": 17 }, "end": { "line": 42, "column": 26 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 43, "column": 8 }, "end": { "line": 43, "column": 25 } } }, "property": { "type": "Identifier", "name": "bottomUpTree", "decorators": [], "loc": { "start": { "line": 43, "column": 26 }, "end": { "line": 43, "column": 38 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 43, "column": 8 }, "end": { "line": 43, "column": 38 } } }, "arguments": [ { "type": "BinaryExpression", "operator": "-", "left": { "type": "BinaryExpression", "operator": "*", "left": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 43, "column": 39 }, "end": { "line": 43, "column": 40 } } }, "right": { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 43, "column": 41 }, "end": { "line": 43, "column": 45 } } }, "loc": { "start": { "line": 43, "column": 39 }, "end": { "line": 43, "column": 45 } } }, "right": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 43, "column": 48 }, "end": { "line": 43, "column": 49 } } }, "loc": { "start": { "line": 43, "column": 39 }, "end": { "line": 43, "column": 49 } } }, { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 43, "column": 51 }, "end": { "line": 43, "column": 56 } } }, "right": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 43, "column": 57 }, "end": { "line": 43, "column": 58 } } }, "loc": { "start": { "line": 43, "column": 51 }, "end": { "line": 43, "column": 58 } } } ], "optional": false, "loc": { "start": { "line": 43, "column": 8 }, "end": { "line": 43, "column": 59 } } }, { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 44, "column": 8 }, "end": { "line": 44, "column": 25 } } }, "property": { "type": "Identifier", "name": "bottomUpTree", "decorators": [], "loc": { "start": { "line": 44, "column": 26 }, "end": { "line": 44, "column": 38 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 44, "column": 8 }, "end": { "line": 44, "column": 38 } } }, "arguments": [ { "type": "BinaryExpression", "operator": "*", "left": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 44, "column": 39 }, "end": { "line": 44, "column": 40 } } }, "right": { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 44, "column": 41 }, "end": { "line": 44, "column": 45 } } }, "loc": { "start": { "line": 44, "column": 39 }, "end": { "line": 44, "column": 45 } } }, { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 44, "column": 47 }, "end": { "line": 44, "column": 52 } } }, "right": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 44, "column": 53 }, "end": { "line": 44, "column": 54 } } }, "loc": { "start": { "line": 44, "column": 47 }, "end": { "line": 44, "column": 54 } } } ], "optional": false, "loc": { "start": { "line": 44, "column": 8 }, "end": { "line": 44, "column": 55 } } }, { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 45, "column": 8 }, "end": { "line": 45, "column": 12 } } } ], "loc": { "start": { "line": 42, "column": 13 }, "end": { "line": 46, "column": 8 } } }, "loc": { "start": { "line": 42, "column": 6 }, "end": { "line": 46, "column": 8 } } } ], "loc": { "start": { "line": 41, "column": 19 }, "end": { "line": 47, "column": 5 } } }, "alternate": null, "loc": { "start": { "line": 41, "column": 4 }, "end": { "line": 47, "column": 5 } } }, { "type": "ReturnStatement", "argument": { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "TreeNode", "decorators": [], "loc": { "start": { "line": 48, "column": 15 }, "end": { "line": 48, "column": 23 } } }, "loc": { "start": { "line": 48, "column": 15 }, "end": { "line": 48, "column": 24 } } }, "loc": { "start": { "line": 48, "column": 15 }, "end": { "line": 48, "column": 24 } } }, "arguments": [ { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 48, "column": 24 }, "end": { "line": 48, "column": 28 } } }, { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 48, "column": 30 }, "end": { "line": 48, "column": 34 } } }, { "type": "Identifier", "name": "item", "decorators": [], "loc": { "start": { "line": 48, "column": 36 }, "end": { "line": 48, "column": 40 } } } ], "loc": { "start": { "line": 48, "column": 11 }, "end": { "line": 48, "column": 42 } } }, "loc": { "start": { "line": 48, "column": 4 }, "end": { "line": 48, "column": 42 } } } ], "loc": { "start": { "line": 40, "column": 56 }, "end": { "line": 49, "column": 4 } } }, "loc": { "start": { "line": 40, "column": 22 }, "end": { "line": 49, "column": 4 } } }, "loc": { "start": { "line": 40, "column": 22 }, "end": { "line": 49, "column": 4 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 40, "column": 3 }, "end": { "line": 49, "column": 4 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "run", "decorators": [], "loc": { "start": { "line": 51, "column": 10 }, "end": { "line": 51, "column": 13 } } }, "kind": "method", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "run", "decorators": [], "loc": { "start": { "line": 51, "column": 10 }, "end": { "line": 51, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 51, "column": 17 }, "end": { "line": 51, "column": 21 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ret", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 52, "column": 14 }, "end": { "line": 52, "column": 17 } } }, "decorators": [], "loc": { "start": { "line": 52, "column": 9 }, "end": { "line": 52, "column": 12 } } }, "init": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 52, "column": 20 }, "end": { "line": 52, "column": 21 } } }, "loc": { "start": { "line": 52, "column": 9 }, "end": { "line": 52, "column": 21 } } } ], "kind": "let", "loc": { "start": { "line": 52, "column": 5 }, "end": { "line": 52, "column": 22 } } }, { "type": "ForUpdateStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "n", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 54, "column": 17 }, "end": { "line": 54, "column": 20 } } }, "decorators": [], "loc": { "start": { "line": 54, "column": 14 }, "end": { "line": 54, "column": 15 } } }, "init": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 54, "column": 23 }, "end": { "line": 54, "column": 40 } } }, "property": { "type": "Identifier", "name": "startDepth", "decorators": [], "loc": { "start": { "line": 54, "column": 41 }, "end": { "line": 54, "column": 51 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 54, "column": 23 }, "end": { "line": 54, "column": 51 } } }, "loc": { "start": { "line": 54, "column": 14 }, "end": { "line": 54, "column": 51 } } } ], "kind": "let", "loc": { "start": { "line": 54, "column": 10 }, "end": { "line": 54, "column": 51 } } }, "test": { "type": "BinaryExpression", "operator": "<=", "left": { "type": "Identifier", "name": "n", "decorators": [], "loc": { "start": { "line": 54, "column": 53 }, "end": { "line": 54, "column": 54 } } }, "right": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 54, "column": 58 }, "end": { "line": 54, "column": 75 } } }, "property": { "type": "Identifier", "name": "endDepth", "decorators": [], "loc": { "start": { "line": 54, "column": 76 }, "end": { "line": 54, "column": 84 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 54, "column": 58 }, "end": { "line": 54, "column": 84 } } }, "loc": { "start": { "line": 54, "column": 53 }, "end": { "line": 54, "column": 84 } } }, "update": { "type": "UpdateExpression", "operator": "++", "prefix": false, "argument": { "type": "Identifier", "name": "n", "decorators": [], "loc": { "start": { "line": 54, "column": 86 }, "end": { "line": 54, "column": 87 } } }, "loc": { "start": { "line": 54, "column": 86 }, "end": { "line": 54, "column": 89 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "minDepth", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 55, "column": 21 }, "end": { "line": 55, "column": 24 } } }, "decorators": [], "loc": { "start": { "line": 55, "column": 11 }, "end": { "line": 55, "column": 19 } } }, "init": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 55, "column": 27 }, "end": { "line": 55, "column": 44 } } }, "property": { "type": "Identifier", "name": "startDepth", "decorators": [], "loc": { "start": { "line": 55, "column": 45 }, "end": { "line": 55, "column": 55 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 55, "column": 27 }, "end": { "line": 55, "column": 55 } } }, "loc": { "start": { "line": 55, "column": 11 }, "end": { "line": 55, "column": 55 } } } ], "kind": "let", "loc": { "start": { "line": 55, "column": 7 }, "end": { "line": 55, "column": 56 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "maxDepth", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 56, "column": 21 }, "end": { "line": 56, "column": 24 } } }, "decorators": [], "loc": { "start": { "line": 56, "column": 11 }, "end": { "line": 56, "column": 19 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "max", "decorators": [], "loc": { "start": { "line": 56, "column": 27 }, "end": { "line": 56, "column": 30 } } }, "arguments": [ { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "minDepth", "decorators": [], "loc": { "start": { "line": 56, "column": 31 }, "end": { "line": 56, "column": 39 } } }, "right": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 56, "column": 42 }, "end": { "line": 56, "column": 43 } } }, "loc": { "start": { "line": 56, "column": 31 }, "end": { "line": 56, "column": 43 } } }, { "type": "Identifier", "name": "n", "decorators": [], "loc": { "start": { "line": 56, "column": 45 }, "end": { "line": 56, "column": 46 } } } ], "optional": false, "loc": { "start": { "line": 56, "column": 27 }, "end": { "line": 56, "column": 47 } } }, "loc": { "start": { "line": 56, "column": 11 }, "end": { "line": 56, "column": 47 } } } ], "kind": "let", "loc": { "start": { "line": 56, "column": 7 }, "end": { "line": 56, "column": 48 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "stretchDepth", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 57, "column": 25 }, "end": { "line": 57, "column": 28 } } }, "decorators": [], "loc": { "start": { "line": 57, "column": 11 }, "end": { "line": 57, "column": 23 } } }, "init": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "maxDepth", "decorators": [], "loc": { "start": { "line": 57, "column": 31 }, "end": { "line": 57, "column": 39 } } }, "right": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 57, "column": 42 }, "end": { "line": 57, "column": 43 } } }, "loc": { "start": { "line": 57, "column": 31 }, "end": { "line": 57, "column": 43 } } }, "loc": { "start": { "line": 57, "column": 11 }, "end": { "line": 57, "column": 43 } } } ], "kind": "let", "loc": { "start": { "line": 57, "column": 7 }, "end": { "line": 57, "column": 44 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "check", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 58, "column": 18 }, "end": { "line": 58, "column": 21 } } }, "decorators": [], "loc": { "start": { "line": 58, "column": 11 }, "end": { "line": 58, "column": 16 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 58, "column": 24 }, "end": { "line": 58, "column": 41 } } }, "property": { "type": "Identifier", "name": "bottomUpTree", "decorators": [], "loc": { "start": { "line": 58, "column": 42 }, "end": { "line": 58, "column": 54 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 58, "column": 24 }, "end": { "line": 58, "column": 54 } } }, "arguments": [ { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 58, "column": 55 }, "end": { "line": 58, "column": 56 } } }, { "type": "Identifier", "name": "stretchDepth", "decorators": [], "loc": { "start": { "line": 58, "column": 58 }, "end": { "line": 58, "column": 70 } } } ], "optional": false, "loc": { "start": { "line": 58, "column": 24 }, "end": { "line": 58, "column": 71 } } }, "property": { "type": "Identifier", "name": "itemCheck", "decorators": [], "loc": { "start": { "line": 58, "column": 72 }, "end": { "line": 58, "column": 81 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 58, "column": 24 }, "end": { "line": 58, "column": 81 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 58, "column": 24 }, "end": { "line": 58, "column": 83 } } }, "loc": { "start": { "line": 58, "column": 11 }, "end": { "line": 58, "column": 83 } } } ], "kind": "let", "loc": { "start": { "line": 58, "column": 7 }, "end": { "line": 58, "column": 84 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "longLivedTree", "decorators": [], "loc": { "start": { "line": 60, "column": 11 }, "end": { "line": 60, "column": 24 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 60, "column": 27 }, "end": { "line": 60, "column": 44 } } }, "property": { "type": "Identifier", "name": "bottomUpTree", "decorators": [], "loc": { "start": { "line": 60, "column": 45 }, "end": { "line": 60, "column": 57 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 60, "column": 27 }, "end": { "line": 60, "column": 57 } } }, "arguments": [ { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 60, "column": 58 }, "end": { "line": 60, "column": 59 } } }, { "type": "Identifier", "name": "maxDepth", "decorators": [], "loc": { "start": { "line": 60, "column": 61 }, "end": { "line": 60, "column": 69 } } } ], "optional": false, "loc": { "start": { "line": 60, "column": 27 }, "end": { "line": 60, "column": 70 } } }, "loc": { "start": { "line": 60, "column": 11 }, "end": { "line": 60, "column": 70 } } } ], "kind": "let", "loc": { "start": { "line": 60, "column": 7 }, "end": { "line": 60, "column": 71 } } }, { "type": "ForUpdateStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 62, "column": 16 }, "end": { "line": 62, "column": 21 } } }, "init": { "type": "Identifier", "name": "minDepth", "decorators": [], "loc": { "start": { "line": 62, "column": 24 }, "end": { "line": 62, "column": 32 } } }, "loc": { "start": { "line": 62, "column": 16 }, "end": { "line": 62, "column": 32 } } } ], "kind": "let", "loc": { "start": { "line": 62, "column": 12 }, "end": { "line": 62, "column": 32 } } }, "test": { "type": "BinaryExpression", "operator": "<=", "left": { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 62, "column": 34 }, "end": { "line": 62, "column": 39 } } }, "right": { "type": "Identifier", "name": "maxDepth", "decorators": [], "loc": { "start": { "line": 62, "column": 43 }, "end": { "line": 62, "column": 51 } } }, "loc": { "start": { "line": 62, "column": 34 }, "end": { "line": 62, "column": 51 } } }, "update": { "type": "AssignmentExpression", "operator": "+=", "left": { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 62, "column": 53 }, "end": { "line": 62, "column": 58 } } }, "right": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 62, "column": 62 }, "end": { "line": 62, "column": 63 } } }, "loc": { "start": { "line": 62, "column": 53 }, "end": { "line": 62, "column": 63 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "iterations", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 63, "column": 25 }, "end": { "line": 63, "column": 28 } } }, "decorators": [], "loc": { "start": { "line": 63, "column": 13 }, "end": { "line": 63, "column": 23 } } }, "init": { "type": "BinaryExpression", "operator": "<<", "left": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 63, "column": 31 }, "end": { "line": 63, "column": 32 } } }, "right": { "type": "BinaryExpression", "operator": "+", "left": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "maxDepth", "decorators": [], "loc": { "start": { "line": 63, "column": 37 }, "end": { "line": 63, "column": 45 } } }, "right": { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 63, "column": 48 }, "end": { "line": 63, "column": 53 } } }, "loc": { "start": { "line": 63, "column": 37 }, "end": { "line": 63, "column": 53 } } }, "right": { "type": "Identifier", "name": "minDepth", "decorators": [], "loc": { "start": { "line": 63, "column": 56 }, "end": { "line": 63, "column": 64 } } }, "loc": { "start": { "line": 63, "column": 36 }, "end": { "line": 63, "column": 65 } } }, "loc": { "start": { "line": 63, "column": 31 }, "end": { "line": 63, "column": 65 } } }, "loc": { "start": { "line": 63, "column": 13 }, "end": { "line": 63, "column": 65 } } } ], "kind": "let", "loc": { "start": { "line": 63, "column": 9 }, "end": { "line": 63, "column": 66 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "check", "decorators": [], "loc": { "start": { "line": 65, "column": 9 }, "end": { "line": 65, "column": 14 } } }, "right": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 65, "column": 17 }, "end": { "line": 65, "column": 18 } } }, "loc": { "start": { "line": 65, "column": 9 }, "end": { "line": 65, "column": 18 } } }, "loc": { "start": { "line": 65, "column": 9 }, "end": { "line": 65, "column": 19 } } }, { "type": "ForUpdateStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "i", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 66, "column": 21 }, "end": { "line": 66, "column": 24 } } }, "decorators": [], "loc": { "start": { "line": 66, "column": 18 }, "end": { "line": 66, "column": 19 } } }, "init": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 66, "column": 27 }, "end": { "line": 66, "column": 28 } } }, "loc": { "start": { "line": 66, "column": 18 }, "end": { "line": 66, "column": 28 } } } ], "kind": "let", "loc": { "start": { "line": 66, "column": 14 }, "end": { "line": 66, "column": 28 } } }, "test": { "type": "BinaryExpression", "operator": "<=", "left": { "type": "Identifier", "name": "i", "decorators": [], "loc": { "start": { "line": 66, "column": 30 }, "end": { "line": 66, "column": 31 } } }, "right": { "type": "Identifier", "name": "iterations", "decorators": [], "loc": { "start": { "line": 66, "column": 35 }, "end": { "line": 66, "column": 45 } } }, "loc": { "start": { "line": 66, "column": 30 }, "end": { "line": 66, "column": 45 } } }, "update": { "type": "UpdateExpression", "operator": "++", "prefix": false, "argument": { "type": "Identifier", "name": "i", "decorators": [], "loc": { "start": { "line": 66, "column": 47 }, "end": { "line": 66, "column": 48 } } }, "loc": { "start": { "line": 66, "column": 47 }, "end": { "line": 66, "column": 50 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "+=", "left": { "type": "Identifier", "name": "check", "decorators": [], "loc": { "start": { "line": 67, "column": 11 }, "end": { "line": 67, "column": 16 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 67, "column": 20 }, "end": { "line": 67, "column": 37 } } }, "property": { "type": "Identifier", "name": "bottomUpTree", "decorators": [], "loc": { "start": { "line": 67, "column": 38 }, "end": { "line": 67, "column": 50 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 67, "column": 20 }, "end": { "line": 67, "column": 50 } } }, "arguments": [ { "type": "Identifier", "name": "i", "decorators": [], "loc": { "start": { "line": 67, "column": 51 }, "end": { "line": 67, "column": 52 } } }, { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 67, "column": 54 }, "end": { "line": 67, "column": 59 } } } ], "optional": false, "loc": { "start": { "line": 67, "column": 20 }, "end": { "line": 67, "column": 60 } } }, "property": { "type": "Identifier", "name": "itemCheck", "decorators": [], "loc": { "start": { "line": 67, "column": 61 }, "end": { "line": 67, "column": 70 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 67, "column": 20 }, "end": { "line": 67, "column": 70 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 67, "column": 20 }, "end": { "line": 67, "column": 72 } } }, "loc": { "start": { "line": 67, "column": 11 }, "end": { "line": 67, "column": 72 } } }, "loc": { "start": { "line": 67, "column": 11 }, "end": { "line": 67, "column": 73 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "+=", "left": { "type": "Identifier", "name": "check", "decorators": [], "loc": { "start": { "line": 68, "column": 11 }, "end": { "line": 68, "column": 16 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 68, "column": 20 }, "end": { "line": 68, "column": 37 } } }, "property": { "type": "Identifier", "name": "bottomUpTree", "decorators": [], "loc": { "start": { "line": 68, "column": 38 }, "end": { "line": 68, "column": 50 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 68, "column": 20 }, "end": { "line": 68, "column": 50 } } }, "arguments": [ { "type": "UnaryExpression", "operator": "-", "prefix": true, "argument": { "type": "Identifier", "name": "i", "decorators": [], "loc": { "start": { "line": 68, "column": 52 }, "end": { "line": 68, "column": 53 } } }, "loc": { "start": { "line": 68, "column": 51 }, "end": { "line": 68, "column": 53 } } }, { "type": "Identifier", "name": "depth", "decorators": [], "loc": { "start": { "line": 68, "column": 55 }, "end": { "line": 68, "column": 60 } } } ], "optional": false, "loc": { "start": { "line": 68, "column": 20 }, "end": { "line": 68, "column": 61 } } }, "property": { "type": "Identifier", "name": "itemCheck", "decorators": [], "loc": { "start": { "line": 68, "column": 62 }, "end": { "line": 68, "column": 71 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 68, "column": 20 }, "end": { "line": 68, "column": 71 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 68, "column": 20 }, "end": { "line": 68, "column": 73 } } }, "loc": { "start": { "line": 68, "column": 11 }, "end": { "line": 68, "column": 73 } } }, "loc": { "start": { "line": 68, "column": 11 }, "end": { "line": 68, "column": 74 } } } ], "loc": { "start": { "line": 66, "column": 52 }, "end": { "line": 69, "column": 10 } } }, "loc": { "start": { "line": 66, "column": 9 }, "end": { "line": 69, "column": 10 } } } ], "loc": { "start": { "line": 62, "column": 65 }, "end": { "line": 70, "column": 8 } } }, "loc": { "start": { "line": 62, "column": 7 }, "end": { "line": 70, "column": 8 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "+=", "left": { "type": "Identifier", "name": "ret", "decorators": [], "loc": { "start": { "line": 72, "column": 7 }, "end": { "line": 72, "column": 10 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "longLivedTree", "decorators": [], "loc": { "start": { "line": 72, "column": 14 }, "end": { "line": 72, "column": 27 } } }, "property": { "type": "Identifier", "name": "itemCheck", "decorators": [], "loc": { "start": { "line": 72, "column": 28 }, "end": { "line": 72, "column": 37 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 72, "column": 14 }, "end": { "line": 72, "column": 37 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 72, "column": 14 }, "end": { "line": 72, "column": 39 } } }, "loc": { "start": { "line": 72, "column": 7 }, "end": { "line": 72, "column": 39 } } }, "loc": { "start": { "line": 72, "column": 7 }, "end": { "line": 72, "column": 40 } } } ], "loc": { "start": { "line": 54, "column": 91 }, "end": { "line": 73, "column": 6 } } }, "loc": { "start": { "line": 54, "column": 5 }, "end": { "line": 73, "column": 6 } } }, { "type": "AssertStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "ret", "decorators": [], "loc": { "start": { "line": 75, "column": 12 }, "end": { "line": 75, "column": 15 } } }, "right": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 75, "column": 19 }, "end": { "line": 75, "column": 36 } } }, "property": { "type": "Identifier", "name": "expected", "decorators": [], "loc": { "start": { "line": 75, "column": 37 }, "end": { "line": 75, "column": 45 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 75, "column": 19 }, "end": { "line": 75, "column": 45 } } }, "loc": { "start": { "line": 75, "column": 12 }, "end": { "line": 75, "column": 45 } } }, "second": { "type": "StringLiteral", "value": "Incorrect result", "loc": { "start": { "line": 75, "column": 47 }, "end": { "line": 75, "column": 65 } } }, "loc": { "start": { "line": 75, "column": 5 }, "end": { "line": 75, "column": 65 } } } ], "loc": { "start": { "line": 51, "column": 22 }, "end": { "line": 76, "column": 4 } } }, "loc": { "start": { "line": 51, "column": 13 }, "end": { "line": 76, "column": 4 } } }, "loc": { "start": { "line": 51, "column": 13 }, "end": { "line": 76, "column": 4 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 51, "column": 3 }, "end": { "line": 76, "column": 4 } } }, { "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": 77, "column": 2 }, "end": { "line": 77, "column": 2 } } } ], "loc": { "start": { "line": 35, "column": 32 }, "end": { "line": 77, "column": 2 } } }, "loc": { "start": { "line": 35, "column": 8 }, "end": { "line": 77, "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": 79, "column": 10 }, "end": { "line": 79, "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": 79, "column": 10 }, "end": { "line": 79, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 79, "column": 18 }, "end": { "line": 79, "column": 22 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 80, "column": 7 }, "end": { "line": 80, "column": 8 } } }, "init": { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "AccessBinaryTrees", "decorators": [], "loc": { "start": { "line": 80, "column": 15 }, "end": { "line": 80, "column": 32 } } }, "loc": { "start": { "line": 80, "column": 15 }, "end": { "line": 80, "column": 33 } } }, "loc": { "start": { "line": 80, "column": 15 }, "end": { "line": 80, "column": 33 } } }, "arguments": [], "loc": { "start": { "line": 80, "column": 11 }, "end": { "line": 80, "column": 33 } } }, "loc": { "start": { "line": 80, "column": 7 }, "end": { "line": 80, "column": 33 } } } ], "kind": "let", "loc": { "start": { "line": 80, "column": 3 }, "end": { "line": 80, "column": 33 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 81, "column": 3 }, "end": { "line": 81, "column": 4 } } }, "property": { "type": "Identifier", "name": "run", "decorators": [], "loc": { "start": { "line": 81, "column": 5 }, "end": { "line": 81, "column": 8 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 81, "column": 3 }, "end": { "line": 81, "column": 8 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 81, "column": 3 }, "end": { "line": 81, "column": 10 } } }, "loc": { "start": { "line": 81, "column": 3 }, "end": { "line": 81, "column": 11 } } } ], "loc": { "start": { "line": 79, "column": 23 }, "end": { "line": 82, "column": 2 } } }, "loc": { "start": { "line": 79, "column": 14 }, "end": { "line": 82, "column": 2 } } }, "loc": { "start": { "line": 79, "column": 14 }, "end": { "line": 82, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 79, "column": 1 }, "end": { "line": 82, "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": 83, "column": 1 } } }