This commit is contained in:
trochas
2025-04-10 10:27:42 +02:00
7 changed files with 109 additions and 13 deletions

View File

@@ -1,7 +1,5 @@
package TP2.asd;
import java.util.Stack;
import org.pcollections.*;
import TP2.asd.Interface.Type;
import TP2.asd.Program.Type_intImp;
@@ -25,7 +23,6 @@ public class SymTable {
this.symTable = symTable;
this.var = var;
}
}
private PStack<PMap<String,ValueTable>> stackMap;
@@ -66,14 +63,6 @@ public class SymTable {
return stackMap.plus(HashTreePMap.empty());
}
public void quit_layer() throws Exception{
if(stackMap.isEmpty()){
throw new Exception();
}
stackMap.minus(stackMap.indexOf(stackMap.getLast()));
}
public PMap<String,ValueTable> peppapeek(){
if(stackMap.isEmpty()){
return this.next_layer().getLast();