From 6bdf1fc6c1b7afe18ffcae05f8fb11eca0f51258 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 25 Jun 2024 11:33:41 +0200 Subject: wip --- src/semanticanalysis/SymbolTable.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/semanticanalysis') 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 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 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())) { -- cgit v1.2.3-18-g5258