Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Object visitArgFunc(ArgFunc argFunc, List<Ast> astTree) throws SemanticException{
- astTree.add(argFunc);
- System.out.println("Visiting Argfunc");
- List <String> expressoesArgumentos = new ArrayList<String>();
- List <String> expressoesFunction = new ArrayList<String>();
- boolean check = false;
- for (Exp exp : argFunc.getExpList()){
- expressoesArgumentos.add((String) exp.visit(this, astTree));
- }
- int tamanho = expressoesArgumentos.size()-1;
- for (int i = 0; i<expressoesArgumentos.size(); i++){
- expressoesFunction.add((String)(((ArgFunc) astTree.get(tamanho)).getExpList().get(i)).visit(this, astTree));
- }
- if (expressoesArgumentos.equals(expressoesFunction)){
- check = true;
- }
- if (!check){
- throw new SemanticException("TIPOS DE ID NÃO CORRESPONDEM");
- }
- // for(Exp exp : argFunc.getExpList()){
- // exp.visit(this, astTree);
- // }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement