Пример #1
0
 public bool Existe(string identificador)
 {
     for (Entorno e = this; e != null; e = e.padre)
     {
         if (e.Contains(identificador))
         {
             return(true);
         }
     }
     return(false);
 }
Пример #2
0
        public Struct ObtenerStruct(string id)
        {
            Entorno global = this.GetGlobal();

            if (global.Contains(id) && ((Simbolo)global[id]).IsStruct())
            {
                return((Struct)global[id]);
            }
            Console.WriteLine("No se encontro al struct " + id + " en este entorno :( ");
            return(null);
        }