summaryrefslogtreecommitdiff
path: root/src/semanticanalysis/SymbolTable.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/semanticanalysis/SymbolTable.java')
-rw-r--r--src/semanticanalysis/SymbolTable.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/semanticanalysis/SymbolTable.java b/src/semanticanalysis/SymbolTable.java
index f2876db..8193d5e 100644
--- a/src/semanticanalysis/SymbolTable.java
+++ b/src/semanticanalysis/SymbolTable.java
@@ -40,8 +40,8 @@ public class SymbolTable {
HashMap<String, STentry> H = this.symbolTable.get(n);
T = H.get(id);
if (T != null) {
- found = true;
- }else {
+ found = true;
+ } else {
n = n - 1;
}
}
@@ -60,8 +60,8 @@ public class SymbolTable {
while ((n >= 0) && !found) {
HashMap<String, STentry> H = this.symbolTable.get(n);
if (H.get(id) != null) {
- found = true;
- }else {
+ found = true;
+ } else {
n = n - 1;
}
}
@@ -125,6 +125,7 @@ public class SymbolTable {
// We always increment the offset by 1 otherwise we need ad-hoc bytecode
// operations
+ // FIXME: wtf is that?
if (type.getClass().equals((new BoolType()).getClass())) {
offs = offs + 1;
} else if (type.getClass().equals((new IntType()).getClass())) {