Esempio n. 1
0
 public ClassType(ArrayList heritage, ObjectSection sec = null)
     : base(heritage, sec)
 {
     if (!IsForward)
     {
         self = new FieldDeclaration("self", new ClassRefType(this.Name, this));
         self.SetScope(Scope.Protected);
         section.fields.Add(self);
     }
 }
Esempio n. 2
0
        //
        // Utilities: add declarations with a given scope
        //

        public void Add(ObjectSection sec)
        {
            if (sec == null)
            {
                return;
            }

            fields.Add(sec.fields);
            decls.Add(sec.decls);
            properties.Add(sec.properties);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
 public InterfaceType(ArrayList heritage, ObjectSection ssec = null, UnaryExpression guid = null)
     : base(heritage, ssec)
 {
     this.guid = guid;
 }