Example #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);
     }
 }
Example #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);
        }
Example #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);
        }
Example #4
0
 public InterfaceType(ArrayList heritage, ObjectSection ssec = null, UnaryExpression guid = null)
     : base(heritage, ssec)
 {
     this.guid = guid;
 }