Example #1
0
        private void FindAllInClass(string name, Scope ClassArea, bool OnlyInThisClass, List <SymbolInfo> Result)
        {
            HashTableNode tn;
            Scope         ar = ClassArea;

            if ((tn = ar.Symbols.Find(name)) != null)
            {
                AddToSymbolInfo(tn.InfoList, Result);
            }

            if (ar is DotNETScope)
            {
                PascalABCCompiler.TreeRealization.BasePCUReader.RestoreSymbols(Result, name);
                AddToSymbolInfo(Result, (DotNETScope)ar, name);
                return;
            }

            ClassScope cl = (ClassScope)ClassArea;

            if (!OnlyInThisClass)
            {
                while (cl.BaseClassScope != null)
                {
                    tn = cl.BaseClassScope.Symbols.Find(name);
                    if (tn != null)
                    {
                        AddToSymbolInfo(tn.InfoList, Result);
                    }

                    ar = cl.BaseClassScope;
                    if (ar is DotNETScope)
                    {
                        AddToSymbolInfo(Result, (DotNETScope)ar, name);
                        return;
                    }
                    cl = (ClassScope)cl.BaseClassScope;
                }
            }
        }
Example #2
0
 public wrapped_common_type_node(PCUReader pr, type_node base_type, string name, SemanticTree.type_access_level type_access_level,
                                 common_namespace_node comprehensive_namespace, SymbolTable.ClassScope cs, location loc, int offset) :
     base(base_type, name, type_access_level, comprehensive_namespace, cs, loc)
 {
     this.pr     = pr;
     this.offset = offset;
 }
Example #3
0
 public List <SymbolInfo> FindOnlyInThisClass(ClassScope scope, string Name)
 {
     return(FindAll(scope, Name, true, true, null));
 }
Example #4
0
 public SymbolInfo FindOnlyInThisClass(ClassScope scope, string Name)
 {
     return FindAll(scope, Name, true, true, null);
 }