public ClassSymbol( WrappedParseTree parsed, string name, ClassSymbol super_class, IList <InterfaceSymbol> implements = null, VM.ClassCreator creator = null ) : this(name, super_class, implements, creator) { this.parsed = parsed; }
public ClassSymbol( string name, ClassSymbol super_class, IList <InterfaceSymbol> implements = null, VM.ClassCreator creator = null ) : base(name) { this.members = new SymbolsStorage(this); this.type = new TypeProxy(this); this.creator = creator; SetSuperClass(super_class); SetImplements(implements); }
void SetSuperClass(ClassSymbol super_class) { if (this.super_class == super_class) { return; } this.super_class = super_class; //NOTE: we define parent members in the current class // scope as well. We do this since we want to // address its members simply by int index if (super_class != null) { var super_members = super_class.members; for (int i = 0; i < super_members.Count; ++i) { var mem = super_members[i]; //NOTE: using base Define instead of our own version // since we want to avoid 'already defined' checks base.Define(mem); } } }