diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-23 15:59:01 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-23 15:59:01 -0600 |
commit | 12520b3e79d1050f8dd7ada09a06d49f19bd5401 (patch) | |
tree | 5b6ba110da43ffcec5c8bcbe387ff5a5920cf59c /boil/library/BoilVisitor.java | |
parent | 1cbc6acab2c1bd745649a639db023b0f6c87f821 (diff) |
Fix first of a few new minor bugs introduced with rewrite
Diffstat (limited to 'boil/library/BoilVisitor.java')
-rw-r--r-- | boil/library/BoilVisitor.java | 30 |
1 files changed, 15 insertions, 15 deletions
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<String,String> { 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<String,String> { 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<String,String> { // 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<String,String> { 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<String,String> { 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())); |