From bd44adf2b180fcc1198d612a8ae0d2a28468088d Mon Sep 17 00:00:00 2001 From: bd-912 Date: Thu, 25 Apr 2024 00:35:18 -0600 Subject: Basic support for 'extended' classes in SymbolTable --- boil/library/BoilVisitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'boil') diff --git a/boil/library/BoilVisitor.java b/boil/library/BoilVisitor.java index 43360b9..00d7dc7 100644 --- a/boil/library/BoilVisitor.java +++ b/boil/library/BoilVisitor.java @@ -37,7 +37,7 @@ public class BoilVisitor extends GJDepthFirst { return attr_index; } - public String memoryReadFilter(String rhs) { + public String memoryReadFilter(TokenKey rhs) { /** * when a method recieves an id of either an alias * or an untranslated variable name, this method will @@ -48,7 +48,7 @@ public class BoilVisitor extends GJDepthFirst { TypeInstance t; if ((t = this.symt.getType(rhs)) != null) { // memory store - ClassInstance cur = this.symt.getClass(this.symt.getActive(TypeEnum.classname)); + ClassInstance cur = (ClassInstance) this.symt.getActive(TypeEnum.classname); attr_index = getVarIndex(cur, t); rhs = String.format("[this+%d]", attr_index); } -- cgit v1.2.3