diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-15 01:30:48 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-15 01:30:48 -0600 |
commit | 664e7846c0ca942dc94029010b94dcc41d78f492 (patch) | |
tree | b106996ed7add062b233b4e267873d5b4e2a40f7 /vaporize | |
parent | 4907f4ed2f471f2ca23dd7ab30f602c1baed84c6 (diff) |
Correctly call Vapor visitor
Diffstat (limited to 'vaporize')
-rw-r--r-- | vaporize/library/TotalSpill.java | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/vaporize/library/TotalSpill.java b/vaporize/library/TotalSpill.java new file mode 100644 index 0000000..9af45ea --- /dev/null +++ b/vaporize/library/TotalSpill.java @@ -0,0 +1,55 @@ +package vaporize.library; + +import cs132.vapor.ast.*; +import st.*; +import misc.*; +import java.util.*; + +public class TotalSpill<P, R> extends VInstr.VisitorPR<P, R, RuntimeException> { + + + private void printNode(P p, Node n) { + PrintFilter.print(n.getClass().getSimpleName(), true); + } + + public R visit(P p, VMemRead n) throws RuntimeException { + this.printNode(p, n); + return null; + } + + public R visit(P p, VMemWrite n) throws RuntimeException { + this.printNode(p, n); + return null; + } + + public R visit(P p, VAssign n) throws RuntimeException { + this.printNode(p, n); + return null; + } + + public R visit(P p, VBranch n) throws RuntimeException { + this.printNode(p, n); + return null; + } + + public R visit(P p, VGoto n) throws RuntimeException { + this.printNode(p, n); + return null; + } + + public R visit(P p, VCall n) throws RuntimeException { + this.printNode(p, n); + return null; + } + + public R visit(P p, VBuiltIn n) throws RuntimeException { + this.printNode(p, n); + return null; + } + + public R visit(P p, VReturn n) throws RuntimeException { + this.printNode(p, n); + return null; + } + +} |