diff options
Diffstat (limited to 'src/ast/nodes/DottedNameNode.java')
-rw-r--r-- | src/ast/nodes/DottedNameNode.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ast/nodes/DottedNameNode.java b/src/ast/nodes/DottedNameNode.java index 46d1b61..df86c99 100644 --- a/src/ast/nodes/DottedNameNode.java +++ b/src/ast/nodes/DottedNameNode.java @@ -21,12 +21,16 @@ public class DottedNameNode implements Node { public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) { ArrayList<SemanticError> errors = new ArrayList<SemanticError>(); + for (int i = 0; i < names.size(); ++i) { + ST.insert(names.get(i).toString(), this.typeCheck(), _nesting, null); + } + return errors; } @Override public Type typeCheck() { - return new VoidType(); + return new ImportType(); } // NOTE: we do not provide code generation for this node in the same way |