diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-08 00:07:44 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-08 00:07:44 -0600 |
commit | 0de1debf8b72c460d6974de8a8ab9cbbdeecb160 (patch) | |
tree | 8f12392fbc7f287089cc2bf393e443a3e44ecded /st/SymbolTable.java | |
parent | c3d4ff012c568a50e3403caf040de704bc201101 (diff) |
J2V works for simple examples
Diffstat (limited to 'st/SymbolTable.java')
-rw-r--r-- | st/SymbolTable.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/st/SymbolTable.java b/st/SymbolTable.java index 7475e5e..d0ea221 100644 --- a/st/SymbolTable.java +++ b/st/SymbolTable.java @@ -37,14 +37,6 @@ public class SymbolTable { /** * Methods intended to be used during the second pass */ - public void setActive(TypeEnum type, String id) { - this.active.put(type, id); - } - - public void removeActive(TypeEnum type) { - this.active.remove(type); - } - public void setExtend(String arg) { String str = this.active.get(TypeEnum.classname); ClassInstance cls = this.getClass(str); @@ -93,6 +85,14 @@ public class SymbolTable { * Methods to safely retrieve differentiable types * in `typecheck', `vaporize' libraries */ + public void setActive(TypeEnum type, String id) { + this.active.put(type, id); + } + + public void removeActive(TypeEnum type) { + this.active.remove(type); + } + public TypeInstance getType(String id) { AbstractInstance symbol; return ((symbol = this.symt.get(id)) != @@ -114,4 +114,8 @@ public class SymbolTable { (ClassInstance) symbol : null; } + public String getActive(TypeEnum type) { + return this.active.get(type); + } + } |