From 664e7846c0ca942dc94029010b94dcc41d78f492 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Mon, 15 Apr 2024 01:30:48 -0600 Subject: Correctly call Vapor visitor --- vaporize/library/TotalSpill.java | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 vaporize/library/TotalSpill.java (limited to 'vaporize/library/TotalSpill.java') 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 extends VInstr.VisitorPR { + + + 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; + } + +} -- cgit v1.2.3