summaryrefslogtreecommitdiff
path: root/boil/library
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-15 19:22:12 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-15 19:22:12 -0600
commit4d8e11688a54ef6b2cf0ba85f7879b5d8dbeec48 (patch)
treea94062ca050d9f9d1036d4962832691f2e720c88 /boil/library
parent57dfa970a0ab45fa69e71e8583fbb9fa267315e1 (diff)
Functional BoilSimp.PrintStatement
Diffstat (limited to 'boil/library')
-rw-r--r--boil/library/BoilSimp.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/boil/library/BoilSimp.java b/boil/library/BoilSimp.java
index 696b0f3..9a69b2c 100644
--- a/boil/library/BoilSimp.java
+++ b/boil/library/BoilSimp.java
@@ -471,9 +471,9 @@ public class BoilSimp extends GJDepthFirst<String,SymbolTable> {
n.f4.accept(this, symt);
TypeInstance tp1 = new TypeInstance("tp1", TypeEnum.ERROR);
- // String.format(" %s = %s\n",
- // this.tf.alias(tp1),
- // expr);
+ vapor += String.format(" %s = %s\n",
+ this.tf.alias(tp1),
+ expr);
vapor += String.format(" PrintIntS(%s)\n",
this.tf.retrieveRecentList(1));
@@ -529,7 +529,7 @@ public class BoilSimp extends GJDepthFirst<String,SymbolTable> {
* f2 -> PrimaryExpression()
*/
public String visit(PlusExpression n, SymbolTable symt) {
- String mod = "p";
+ String mod = "";
String oper1 = n.f0.accept(this, symt);
n.f1.accept(this, symt);
String oper2 = n.f2.accept(this, symt);
@@ -571,7 +571,7 @@ public class BoilSimp extends GJDepthFirst<String,SymbolTable> {
n.f1.accept(this, symt);
String oper2 = n.f2.accept(this, symt);
- mod += String.format("Mul(%s %s)",
+ mod += String.format("MulS(%s %s)",
oper1,
oper2);
@@ -639,7 +639,7 @@ public class BoilSimp extends GJDepthFirst<String,SymbolTable> {
mtdIndex);
n.f3.accept(this, symt);
- n.f4.accept(this, symt);
+ this.vapor += n.f4.accept(this, symt);
n.f5.accept(this, symt);
mod += String.format("call %s(%s",
@@ -667,7 +667,7 @@ public class BoilSimp extends GJDepthFirst<String,SymbolTable> {
this.tf.alias(tp1),
rhs);
- n.f1.accept(this, symt);
+ mod += n.f1.accept(this, symt);
return mod;
}