Пример #1
0
 public object Ejecutar(Ambito ambito)
 {
     AST.Ejecutar(ambito);
     if (this.Hereda)
     {
         Clase padre = Estatico.clasesDisponibles.getClase(this.Padre.ToLower());
         if (padre != null)
         {
             Ambito tata = new Ambito(null, this.Padre.ToLower() + " " + this.idClase, ambito.archivo);
             tata = (Ambito)padre.Ejecutar(tata);
             ambito.HeredaAmbito(tata);
         }
         else
         {
             TError error = new TError("Semantico", "Se intenta heredar: \"" + padre + "\" la cual no existe, desde clase: \"" + this.idClase + "\" | Clase: " + this.idClase + " | Archivo: " + ambito.archivo, 0, 0, false);
             Estatico.ColocaError(error);
             Estatico.errores.Add(error);
         }
     }
     return(ambito);
 }