declare works with list
This commit is contained in:
@@ -46,6 +46,15 @@ public class SymTable {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Type getvar_Type(String s){
|
||||
for(int i= stackMap.size()-1; i>=0; i--){
|
||||
if(stackMap.get(i).containsKey(s)){
|
||||
return stackMap.get(i).get(s);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String print_all(){
|
||||
StringBuilder str = new StringBuilder();
|
||||
for(int i= stackMap.size()-1; i>=0; i--){
|
||||
|
||||
Reference in New Issue
Block a user