correction bug id des var temp dans le while
This commit is contained in:
@@ -61,10 +61,16 @@ public class SymTable {
|
||||
return new Result(newSymTab,newVar);
|
||||
}
|
||||
|
||||
//retourne le nom de la var déjà déclaré avec son id
|
||||
public String getVar(String nomVar){
|
||||
return nomVar + this.stackMap.getLast().get(nomVar).id;
|
||||
}
|
||||
|
||||
//retourne le type de la var
|
||||
public Type getType(String nomVar){
|
||||
return this.stackMap.getLast().get(nomVar).type;
|
||||
}
|
||||
|
||||
public PStack<PMap<String,ValueTable>> next_layer(){
|
||||
return stackMap.plus(HashTreePMap.empty());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user