Hi there! --- After parse: --- { "type": "Program", "statements": [ { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "GoodGreeter", "decorators": [] }, "superClass": null, "implements": [], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "name", "decorators": [] }, "accessibility": "public", "static": false, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [] } } }, "definite": false, "decorators": [] }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "invoke", "decorators": [] }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "invoke", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType" }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 5 } } ] } } }, "overloads": [], "decorators": [] }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "decorators": [] }, "kind": "constructor", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } } ] } } }, "overloads": [], "decorators": [] } ] } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "decorators": [] }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "GoodGreeter", "decorators": [] }, "arguments": [], "optional": false } } ], "kind": "let" }, { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "main", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "m", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 1 } } ], "kind": "let" }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "n", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 2 } } ], "kind": "let" }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "console", "decorators": [] }, "property": { "type": "Identifier", "name": "log", "decorators": [] }, "computed": false, "optional": false }, "arguments": [ { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "m", "decorators": [] }, "right": { "type": "Identifier", "name": "n", "decorators": [] } } ], "optional": false } } ] } } } ] } --- { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "GoodGreeter", "decorators": [] }, "superClass": null, "implements": [], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "name", "decorators": [] }, "accessibility": "public", "static": false, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [] } } }, "definite": false, "decorators": [] }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "invoke", "decorators": [] }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "invoke", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType" }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 5 } } ] } } }, "overloads": [], "decorators": [] }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "decorators": [] }, "kind": "constructor", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } } ] } } }, "overloads": [], "decorators": [] } ] } } --- { "id": { "type": "Identifier", "name": "GoodGreeter", "decorators": [] }, "superClass": null, "implements": [], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "name", "decorators": [] }, "accessibility": "public", "static": false, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [] } } }, "definite": false, "decorators": [] }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "invoke", "decorators": [] }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "invoke", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType" }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 5 } } ] } } }, "overloads": [], "decorators": [] }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "decorators": [] }, "kind": "constructor", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } } ] } } }, "overloads": [], "decorators": [] } ] } --- { "type": "Identifier", "name": "GoodGreeter", "decorators": [] } --- { "type": "ClassProperty", "key": { "type": "Identifier", "name": "name", "decorators": [] }, "accessibility": "public", "static": false, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [] } } }, "definite": false, "decorators": [] } --- { "type": "Identifier", "name": "name", "decorators": [] } --- { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [] } } } --- { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "string", "decorators": [] } } --- { "type": "Identifier", "name": "string", "decorators": [] } --- { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "invoke", "decorators": [] }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "invoke", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType" }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 5 } } ] } } }, "overloads": [], "decorators": [] } --- { "type": "Identifier", "name": "invoke", "decorators": [] } --- { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "invoke", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType" }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 5 } } ] } } } --- { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "invoke", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType" }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 5 } } ] } } --- { "type": "Identifier", "name": "invoke", "decorators": [] } --- { "type": "ETSPrimitiveType" } --- { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 5 } } ] } --- { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 5 } } --- { "type": "NumberLiteral", "value": 5 } --- { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "decorators": [] }, "kind": "constructor", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } } ] } } }, "overloads": [], "decorators": [] } --- { "type": "Identifier", "name": "constructor", "decorators": [] } --- { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } } ] } } } --- { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } } ] } } --- { "type": "Identifier", "name": "constructor", "decorators": [] } --- { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } } ] } --- { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } } --- { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false }, "right": { "type": "StringLiteral", "value": "hello" } } --- { "type": "MemberExpression", "object": { "type": "ThisExpression" }, "property": { "type": "Identifier", "name": "name", "decorators": [] }, "computed": false, "optional": false } --- { "type": "ThisExpression" } --- { "type": "Identifier", "name": "name", "decorators": [] } --- { "type": "StringLiteral", "value": "hello" } --- { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "decorators": [] }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "GoodGreeter", "decorators": [] }, "arguments": [], "optional": false } } ], "kind": "let" } --- { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "decorators": [] }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "GoodGreeter", "decorators": [] }, "arguments": [], "optional": false } } --- { "type": "Identifier", "name": "a", "decorators": [] } --- { "type": "CallExpression", "callee": { "type": "Identifier", "name": "GoodGreeter", "decorators": [] }, "arguments": [], "optional": false } --- { "type": "Identifier", "name": "GoodGreeter", "decorators": [] } --- { "type": "FunctionDeclaration", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "main", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "m", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 1 } } ], "kind": "let" }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "n", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 2 } } ], "kind": "let" }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "console", "decorators": [] }, "property": { "type": "Identifier", "name": "log", "decorators": [] }, "computed": false, "optional": false }, "arguments": [ { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "m", "decorators": [] }, "right": { "type": "Identifier", "name": "n", "decorators": [] } } ], "optional": false } } ] } } } --- { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "main", "decorators": [] }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "m", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 1 } } ], "kind": "let" }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "n", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 2 } } ], "kind": "let" }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "console", "decorators": [] }, "property": { "type": "Identifier", "name": "log", "decorators": [] }, "computed": false, "optional": false }, "arguments": [ { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "m", "decorators": [] }, "right": { "type": "Identifier", "name": "n", "decorators": [] } } ], "optional": false } } ] } } --- { "type": "Identifier", "name": "main", "decorators": [] } --- { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "m", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 1 } } ], "kind": "let" }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "n", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 2 } } ], "kind": "let" }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "console", "decorators": [] }, "property": { "type": "Identifier", "name": "log", "decorators": [] }, "computed": false, "optional": false }, "arguments": [ { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "m", "decorators": [] }, "right": { "type": "Identifier", "name": "n", "decorators": [] } } ], "optional": false } } ] } --- { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "m", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 1 } } ], "kind": "let" } --- { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "m", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 1 } } --- { "type": "Identifier", "name": "m", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] } --- { "type": "ETSPrimitiveType" } --- { "type": "NumberLiteral", "value": 1 } --- { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "n", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 2 } } ], "kind": "let" } --- { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "n", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] }, "init": { "type": "NumberLiteral", "value": 2 } } --- { "type": "Identifier", "name": "n", "typeAnnotation": { "type": "ETSPrimitiveType" }, "decorators": [] } --- { "type": "ETSPrimitiveType" } --- { "type": "NumberLiteral", "value": 2 } --- { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "console", "decorators": [] }, "property": { "type": "Identifier", "name": "log", "decorators": [] }, "computed": false, "optional": false }, "arguments": [ { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "m", "decorators": [] }, "right": { "type": "Identifier", "name": "n", "decorators": [] } } ], "optional": false } } --- { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "console", "decorators": [] }, "property": { "type": "Identifier", "name": "log", "decorators": [] }, "computed": false, "optional": false }, "arguments": [ { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "m", "decorators": [] }, "right": { "type": "Identifier", "name": "n", "decorators": [] } } ], "optional": false } --- { "type": "MemberExpression", "object": { "type": "Identifier", "name": "console", "decorators": [] }, "property": { "type": "Identifier", "name": "log", "decorators": [] }, "computed": false, "optional": false } --- { "type": "Identifier", "name": "console", "decorators": [] } --- { "type": "Identifier", "name": "log", "decorators": [] } --- { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "m", "decorators": [] }, "right": { "type": "Identifier", "name": "n", "decorators": [] } } --- { "type": "Identifier", "name": "m", "decorators": [] } --- { "type": "Identifier", "name": "n", "decorators": [] } --- After check: --- After lowerings: ---