Пример #1
0
 protected ClassSymbol(TextPosition tp, string name, ClassType type, ProgramContext block)
     : base(tp)
 {
     Name = name;
     ClassType = type;
     Block = block;
     This = new ThisSymbol(this);
     Block.Append(This);
     AppendChild(Block);
     IsInitialize = true;
 }
Пример #2
0
 public void Initialize(string name, ClassType type, ProgramContext block, IReadOnlyList<AttributeSymbol> attr, IReadOnlyList<GenericSymbol> gnr, IReadOnlyList<TypeSymbol> inherit)
 {
     if (IsInitialize)
     {
         throw new InvalidOperationException();
     }
     IsInitialize = true;
     Name = name;
     ClassType = type;
     Block = block;
     This = new ThisSymbol(this);
     Block.Append(This);
     AppendChild(Block);
     _Attribute = attr;
     _Generics = gnr;
     _Inherit = inherit;
 }