// Path: src/compiler/Visitor.java
// public static SymbolTable tablaSimbolos;


import static compiler.Visitor.tablaSimbolos;
import java.util.ArrayList;
import java.util.Map;
            if (sp != null){
                if (i != (j+1)){
                    IntermediateCode c = copyArray.get(i);
                    copyArray.remove(i);
                    copyArray.add(j+1, c);
                    j = j +1 ;
                }else{
                    j = i ;
                }
            }
          
            
            
        }
        this.arrayCode = copyArray;
    }
    
    public IntermediateCode searchCodeGlobal(String nombreVar){
        for (int i = 0;i<this.arrayCode.size();i++){
            IntermediateCode inter = this.arrayCode.get(i);
            String etiqueta = inter.getEtiqueta().substring(0,inter.getEtiqueta().indexOf("_"));
           if (inter.isGlobal()&&etiqueta.equals(nombreVar)){
               return inter;
           }
        }
        return null;
    }
    
    public Symbol searchSymbolLastScope(String nombreVar){
        ArrayList<Symbol> simbolos = new ArrayList();
// Path: src/compiler/Visitor.java
// public static SymbolTable tablaSimbolos;


// Path: src/compiler/InterCodeTable.java
import static compiler.Visitor.tablaSimbolos;
import java.util.ArrayList;
import java.util.Map;

            if (sp != null){
                if (i != (j+1)){
                    IntermediateCode c = copyArray.get(i);
                    copyArray.remove(i);
                    copyArray.add(j+1, c);
                    j = j +1 ;
                }else{
                    j = i ;
                }
            }
          
            
            
        }
        this.arrayCode = copyArray;
    }
    
    public IntermediateCode searchCodeGlobal(String nombreVar){
        for (int i = 0;i<this.arrayCode.size();i++){
            IntermediateCode inter = this.arrayCode.get(i);
            String etiqueta = inter.getEtiqueta().substring(0,inter.getEtiqueta().indexOf("_"));
           if (inter.isGlobal()&&etiqueta.equals(nombreVar)){
               return inter;
           }
        }
        return null;
    }
    
    public Symbol searchSymbolLastScope(String nombreVar){
        ArrayList<Symbol> simbolos = new ArrayList();
        for (Map.Entry<Integer, Symbol> entry : tablaSimbolos.getTabla().entrySet()) {