Ignore:
Timestamp:
Oct 18, 2010, 8:53:48 AM (14 years ago)
Author:
george
Message:

Added: Base parsing of class, pointer and enumeration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Transpascal/Compiler/USourceCode.pas

    r64 r65  
    158158  end;
    159159
    160   { TTypeRecord }
     160  TTypeInherited = class(TType)
     161  end;
    161162
    162163  TTypeRecord = class(TType)
     
    169170    IndexType: TType;
    170171    ItemType: TType;
     172  end;
     173
     174  TTypePointer = class(TType)
     175  end;
     176
     177  TEnumItem = class
     178    Name: string;
     179    Index: Integer;
     180  end;
     181
     182  TTypeEnumeration = class(TType)
     183    Items: TObjectList; // TObjectList<TEnumItem>
     184    constructor Create;
     185    destructor Destroy; override;
     186  end;
     187
     188  { TTypeClass }
     189
     190  TTypeClass = class(TType)
     191    Items: TObjectList; // TObjectList<TType>
     192    constructor Create;
     193    destructor Destroy; override;
    171194  end;
    172195
     
    787810end;
    788811
     812{ TTypeEnumeration }
     813
     814constructor TTypeEnumeration.Create;
     815begin
     816  inherited;
     817  Items := TObjectList.Create;
     818end;
     819
     820destructor TTypeEnumeration.Destroy;
     821begin
     822  Items.Free;
     823  inherited Destroy;
     824end;
     825
     826{ TTypeClass }
     827
     828constructor TTypeClass.Create;
     829begin
     830  Items := TObjectList.Create;
     831end;
     832
     833destructor TTypeClass.Destroy;
     834begin
     835  Items.Free;
     836  inherited Destroy;
     837end;
     838
    789839end.
    790840
Note: See TracChangeset for help on using the changeset viewer.