diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-04-23 00:24:42 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-04-23 00:24:42 -0600 |
commit | a1c15f046183373baf5deb66e77188e656806fb7 (patch) | |
tree | fc1a7f584e67dc583d335f09d5271a45ff7d9df4 /submit/SymbolInfo.java | |
parent | 5f28f80c4e25a56cd444914c2f0b3da5e7fdb088 (diff) | |
download | cminus-a1c15f046183373baf5deb66e77188e656806fb7.tar.gz cminus-a1c15f046183373baf5deb66e77188e656806fb7.zip |
Diffstat (limited to 'submit/SymbolInfo.java')
-rw-r--r-- | submit/SymbolInfo.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/submit/SymbolInfo.java b/submit/SymbolInfo.java index 19c3f9b..c640718 100644 --- a/submit/SymbolInfo.java +++ b/submit/SymbolInfo.java @@ -16,6 +16,7 @@ public class SymbolInfo { // In the case of a function, type is the return type private final VarType type; private final boolean function; + private int offset; public SymbolInfo(String id, VarType type, boolean function) { this.id = id; @@ -23,9 +24,20 @@ public class SymbolInfo { this.function = function; } + public SymbolInfo(String id, VarType type, boolean function, int offset) { + this(id, type, function); + this.offset = offset; + } + @Override public String toString() { return "<" + id + ", " + type + '>'; } + public VarType getType() { return type; } + + public boolean isFunction() { return function; } + + public int getOffset() { return offset; } + public void setOffset(int offset) { this.offset = offset; } } |