Changeset 64 for branches/Transpascal/Compiler/UCompiler.pas
- Timestamp:
- Oct 15, 2010, 2:13:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Compiler/UCompiler.pas
r60 r64 18 18 end; 19 19 20 { TCompiler } 20 TCompilerTarget = class 21 Vendor: string; 22 Model: string; 23 Architecture: string; 24 end; 25 26 { TCompilerList } 27 28 TCompilerTargetList = class(TObjectList) 29 procedure Add(Vendor, Model, Architecture: string); 30 end; 21 31 22 32 TCompiler = class … … 30 40 ErrorMessages: TObjectList; 31 41 CompiledFolder: string; 42 SupportedTargets: TCompilerTargetList; 43 Target: TCompilerTarget; 32 44 constructor Create; 45 destructor Destroy; override; 33 46 procedure Init; 34 47 procedure Compile(ModuleName: string; Source: TStringList); 35 destructor Destroy; override;36 48 property OnErrorMessage: TOnErrorMessage read FOnErrorMessage 37 49 write FOnErrorMessage; … … 69 81 constructor TCompiler.Create; 70 82 begin 83 SupportedTargets := TCompilerTargetList.Create; 84 SupportedTargets.Add('AMD', 'Athlon II', 'amd64'); 85 SupportedTargets.Add('Zilog', 'Z80', 'Z80'); 86 SupportedTargets.Add('Rabbit', 'RC3000', 'Z180'); 87 SupportedTargets.Add('Atmel', 'ATmega8', 'AVR'); 88 SupportedTargets.Add('Atmel', 'UC3B0256', 'AVR32'); 89 SupportedTargets.Add('Dallas', 'DS89C450', '8052'); 90 71 91 ProgramCode := TProgram.Create; 72 92 Producer := TProducerC.Create; … … 89 109 Producer.Free; 90 110 ErrorMessages.Free; 111 SupportedTargets.Free; 91 112 end; 92 113 … … 103 124 end; 104 125 126 { TCompilerTargetList } 127 128 procedure TCompilerTargetList.Add(Vendor, Model, Architecture: string); 129 var 130 NewItem: TCompilerTarget; 131 begin 132 NewItem := TCompilerTarget.Create; 133 NewItem.Vendor := Vendor; 134 NewItem.Model := Model; 135 NewItem.Architecture := Architecture; 136 inherited Add(NewItem); 137 end; 138 105 139 end.
Note:
See TracChangeset
for help on using the changeset viewer.