String nombre;
AST exportacion;
AST importacion;
+ AST implementacion;
public Modulo(String nombre, AST arbol){
this.nombre = nombre;
ASTFactory f = new ASTFactory();
this.importacion = f.dupTree(t);
}
+ if(t.getText().equals("implementacion")){
+ ASTFactory f = new ASTFactory();
+ this.implementacion = f.dupTree(t);
+ }
t = t.getNextSibling();
}
}
}
return arbol;
}
+
+ public AST getDeclaracion_interna(String nombre){
+ AST arbol = implementacion.getFirstChild();
+ while(!arbol.getFirstChild().getText().equals(nombre)){
+ arbol = arbol.getNextSibling();
+ if (arbol == null)
+ break;
+ }
+ return arbol;
+ }
+
public AST getImportacion(){
return importacion;
}