|
Last change
on this file was 26, checked in by chronos, 13 years ago |
- Upraveno: Překlad rozdělen do fáze zpracování maker a druhé fáze zpracování instrukcí.
|
|
File size:
762 bytes
|
| Line | |
|---|
| 1 | unit USource;
|
|---|
| 2 |
|
|---|
| 3 | {$mode delphi}{$H+}
|
|---|
| 4 |
|
|---|
| 5 | interface
|
|---|
| 6 |
|
|---|
| 7 | uses
|
|---|
| 8 | Classes, SysUtils, SpecializedList;
|
|---|
| 9 |
|
|---|
| 10 | type
|
|---|
| 11 | TSourceItem = class
|
|---|
| 12 | end;
|
|---|
| 13 |
|
|---|
| 14 | TSourceItemText = class(TSourceItem)
|
|---|
| 15 | Text: string;
|
|---|
| 16 | end;
|
|---|
| 17 |
|
|---|
| 18 | TSourceItemMacro = class(TSourceItem)
|
|---|
| 19 | Name: string;
|
|---|
| 20 | Parameters: TListString;
|
|---|
| 21 | Items: TListObject;
|
|---|
| 22 | end;
|
|---|
| 23 |
|
|---|
| 24 | { TSource }
|
|---|
| 25 |
|
|---|
| 26 | TSource = class
|
|---|
| 27 | Items: TListObject; // TListObject<TSourceItem>
|
|---|
| 28 | constructor Create;
|
|---|
| 29 | destructor Destroy; override;
|
|---|
| 30 | end;
|
|---|
| 31 |
|
|---|
| 32 | TAsmSource = class
|
|---|
| 33 | Labels: TListObject;
|
|---|
| 34 | // Items:
|
|---|
| 35 | end;
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | implementation
|
|---|
| 39 |
|
|---|
| 40 | { TSource }
|
|---|
| 41 |
|
|---|
| 42 | constructor TSource.Create;
|
|---|
| 43 | begin
|
|---|
| 44 | Items := TListObject.Create
|
|---|
| 45 | end;
|
|---|
| 46 |
|
|---|
| 47 | destructor TSource.Destroy;
|
|---|
| 48 | begin
|
|---|
| 49 | FreeAndNil(Items);
|
|---|
| 50 | inherited;
|
|---|
| 51 | end;
|
|---|
| 52 |
|
|---|
| 53 | end.
|
|---|
| 54 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.