modify print
This commit is contained in:
@@ -74,14 +74,14 @@ public class Program{
|
||||
}
|
||||
}
|
||||
|
||||
public static record PrintImp(ArrayList<String> t) implements Instruction{
|
||||
public static record PrintImp(ArrayList<Object> t) implements Instruction{
|
||||
@Override
|
||||
public <H, S> S accept(InstrVisitor<H, S> v, H h) {
|
||||
return v.visitPrint(this, h);
|
||||
}
|
||||
}
|
||||
|
||||
public static record ReadImp(ArrayList<String> t) implements Instruction{
|
||||
public static record ReadImp(ArrayList<VarImp> t) implements Instruction{
|
||||
@Override
|
||||
public <H, S> S accept(InstrVisitor<H, S> v, H h) {
|
||||
return v.visitRead(this, h);
|
||||
|
||||
@@ -31,6 +31,7 @@ public class SymTable {
|
||||
stackMap.minus(stackMap.indexOf(stackMap.getLast()));
|
||||
}
|
||||
public PMap<String,Type> peppapeek(){
|
||||
System.out.print("TEST0");
|
||||
return stackMap.getLast();
|
||||
}
|
||||
|
||||
@@ -40,6 +41,7 @@ public class SymTable {
|
||||
pmap= pmap.plus(s/*+"_"+this.id*/,t);
|
||||
//this.id++;
|
||||
//Delete old ones
|
||||
System.out.print("TEST1");
|
||||
stackMap.minus(stackMap.indexOf(stackMap.getLast()));
|
||||
//Push the new one
|
||||
stackMap.plus(pmap);
|
||||
|
||||
Reference in New Issue
Block a user