From 12520b3e79d1050f8dd7ada09a06d49f19bd5401 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Tue, 23 Apr 2024 15:59:01 -0600 Subject: Fix first of a few new minor bugs introduced with rewrite --- boil/library/BoilVisitor.java | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'boil/library/BoilVisitor.java') diff --git a/boil/library/BoilVisitor.java b/boil/library/BoilVisitor.java index 7de9939..4149bd9 100644 --- a/boil/library/BoilVisitor.java +++ b/boil/library/BoilVisitor.java @@ -350,8 +350,8 @@ public class BoilVisitor extends GJDepthFirst { n.getClass().getSimpleName(), id)); /////////////////////////////////////////////////////////////// - _ret += id + " "; - n.f0.accept(this, argu); + // n.f0.accept(this, argu); + _ret += n.f1.accept(this,argu) + " "; /////////////////////////////////////////////////////////////// MinimalLogger.info(String.format("<- %s (%s)", n.getClass().getSimpleName(), @@ -814,6 +814,7 @@ public class BoilVisitor extends GJDepthFirst { MinimalLogger.info(String.format("-> %s", n.getClass().getSimpleName())); /////////////////////////////////////////////////////////////// + _ret += this.tf.alias(this.getUniqueID()); String mtd = n.f2.f0.tokenImage; String rhs; TypeInstance t; @@ -827,17 +828,15 @@ public class BoilVisitor extends GJDepthFirst { // we'll do everything here and exit the function MinimalLogger.info("Message send found THIS"); rhs = n.f0.accept(this, argu); - String callID = this.tf.alias(this.getUniqueID()); this.addVapor(n.f4.accept(this, argu)); this.addVapor(String.format(" %s = call %s(this", - callID, - mtd)); + _ret, + rhs)); this.addVapor(String.format(" %s)\n", this.tf.retrieveRecentList(this.symt.getMethod(mtd) .getArguments() .size()))); - return callID; - + return _ret; case 6: MinimalLogger.info("Message send found ANONYMOUS"); // expand the entire object out! @@ -852,7 +851,7 @@ public class BoilVisitor extends GJDepthFirst { this.addVapor(String.format(" [%s+%d] = %s\n", this.tf.alias(t.getName()), 0, - id)); + rhs)); break; default: MinimalLogger.severe("Message send found UNKNOWN"); @@ -879,14 +878,15 @@ public class BoilVisitor extends GJDepthFirst { this.addVapor(n.f4.accept(this, argu)); - _ret += String.format("call %s(%s", - tp2, - this.tf.alias(t.getName())); + this.addVapor(String.format(" %s = call %s(%s", + _ret, + tp2, + this.tf.alias(t.getName()))); - _ret += String.format(" %s)", - this.tf.retrieveRecentList(this.symt.getMethod(mtd) - .getArguments() - .size())); + this.addVapor(String.format(" %s)\n", + this.tf.retrieveRecentList(this.symt.getMethod(mtd) + .getArguments() + .size()))); /////////////////////////////////////////////////////////////// MinimalLogger.info(String.format("<- %s", n.getClass().getSimpleName())); -- cgit v1.2.3