Пример #1
0
 /// <summary>
 /// Returns all own members with the given scope
 /// </summary>
 public virtual IEnumerable <Declaration> GetOwnMembers(Scope s = (Scope)0xffffff)
 {
     if (!IsForward)
     {
         return(section.Decls(s));
     }
     else
     {
         return(DeclarationList.Empty.Cast <MethodDeclaration>());
     }
 }
Пример #2
0
        public CompositeType(ArrayList inherits, ObjectSection sec)
        {
            if (inherits == null)
            {
                heritage = new List <String>();
            }
            else
            {
                heritage = new List <String>(inherits.Cast <String>());
            }

            section = sec;
            if (!IsForward)
            {
                section.declaringObject = this;
                foreach (var d in section.Decls().Cast <IScopedDeclaration>())
                {
                    d.SetDeclaringObject(this);
                }
            }

            // to be filled during resolving
            ancestors = new List <CompositeType>(heritage.Count);
        }