コード例 #1
0
 public Ambito(Ambito anterior, String idAmbito)
 {
     this.Anterior   = anterior;
     this.idAmbito   = idAmbito;
     this.tablaVars  = new TablaVariables();
     this.tablaFuns  = new TablaFunciones();
     this.tablaConst = new TablaConstructores();
 }
コード例 #2
0
        public void heredaMetodosFunciones(TablaFunciones tabla)
        {
            Hashtable auxiliar = tabla.funciones;

            foreach (DictionaryEntry data in auxiliar)
            {
                if (data.Value is Funcion)
                {
                    Funcion f = (Funcion)data.Value;
                    Clave   c = (Clave)data.Key;
                    if (!this.existeFuncion(c) && (f.Vibililidad == Estatico.Vibililidad.PUBLICO || f.Vibililidad == Estatico.Vibililidad.PROTEGIDO))
                    {
                        this.tablaFuns.agregarFuncion(c, f);
                    }
                }
            }
        }
コード例 #3
0
        public void tomaFunciones(TablaFunciones tablapadre, bool ignoraVisibilidad)
        {
            Hashtable auxiliar = tablapadre.funciones;

            foreach (DictionaryEntry data in auxiliar)
            {
                if (data.Value is Funcion)
                {
                    Funcion f = (Funcion)data.Value;
                    Clave   c = (Clave)data.Key;
                    if (this.existeFuncion(c))
                    {
                        return;
                    }
                    if (f.Vibililidad == Estatico.Vibililidad.PUBLICO || ignoraVisibilidad)
                    {
                        this.tablaFuns.agregarFuncion(c, f);
                    }
                }
            }
        }