diff --git a/Interpreter.Lib/IR/Ast/Impl/Nodes/Declarations/FunctionDeclaration.cs b/Interpreter.Lib/IR/Ast/Impl/Nodes/Declarations/FunctionDeclaration.cs index dc80106a..89e464fe 100644 --- a/Interpreter.Lib/IR/Ast/Impl/Nodes/Declarations/FunctionDeclaration.cs +++ b/Interpreter.Lib/IR/Ast/Impl/Nodes/Declarations/FunctionDeclaration.cs @@ -61,8 +61,6 @@ public void Clear() SymbolTable.Clear(); } - public FunctionSymbol GetSymbol() => Function; - public override IEnumerator GetEnumerator() { yield return Statements; diff --git a/Interpreter.Lib/IR/Ast/Impl/Nodes/Expressions/ComplexLiterals/ObjectLiteral.cs b/Interpreter.Lib/IR/Ast/Impl/Nodes/Expressions/ComplexLiterals/ObjectLiteral.cs index c9f93a92..a7db06fa 100644 --- a/Interpreter.Lib/IR/Ast/Impl/Nodes/Expressions/ComplexLiterals/ObjectLiteral.cs +++ b/Interpreter.Lib/IR/Ast/Impl/Nodes/Expressions/ComplexLiterals/ObjectLiteral.cs @@ -36,7 +36,7 @@ internal override Type NodeCheck() }); Methods.ForEach(m => { - var symbol = m.GetSymbol(); + var symbol = m.Function; propertyTypes.Add(new PropertyType(symbol.Id, symbol.Type)); }); var type = new ObjectType(propertyTypes); diff --git a/Interpreter.Lib/IR/CheckSemantics/Visitors/DeclarationVisitor.cs b/Interpreter.Lib/IR/CheckSemantics/Visitors/DeclarationVisitor.cs index bab1b00a..3748cc1a 100644 --- a/Interpreter.Lib/IR/CheckSemantics/Visitors/DeclarationVisitor.cs +++ b/Interpreter.Lib/IR/CheckSemantics/Visitors/DeclarationVisitor.cs @@ -32,6 +32,7 @@ public Unit Visit(LexicalDeclaration visitable) public Unit Visit(FunctionDeclaration visitable) { + //visitable.Parent.SymbolTable.AddSymbol(visitable.GetSymbol()); throw new NotImplementedException(); } } \ No newline at end of file