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