Ignore:
Timestamp:
Oct 15, 2010, 2:13:42 PM (14 years ago)
Author:
george
Message:
  • Fixed: Focus message position in code.
File:
1 edited

Legend:

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

    r60 r64  
    1818  end;
    1919
    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;
    2131
    2232  TCompiler = class
     
    3040    ErrorMessages: TObjectList;
    3141    CompiledFolder: string;
     42    SupportedTargets: TCompilerTargetList;
     43    Target: TCompilerTarget;
    3244    constructor Create;
     45    destructor Destroy; override;
    3346    procedure Init;
    3447    procedure Compile(ModuleName: string; Source: TStringList);
    35     destructor Destroy; override;
    3648    property OnErrorMessage: TOnErrorMessage read FOnErrorMessage
    3749      write FOnErrorMessage;
     
    6981constructor TCompiler.Create;
    7082begin
     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
    7191  ProgramCode := TProgram.Create;
    7292  Producer := TProducerC.Create;
     
    89109  Producer.Free;
    90110  ErrorMessages.Free;
     111  SupportedTargets.Free;
    91112end;
    92113
     
    103124end;
    104125
     126{ TCompilerTargetList }
     127
     128procedure TCompilerTargetList.Add(Vendor, Model, Architecture: string);
     129var
     130  NewItem: TCompilerTarget;
     131begin
     132  NewItem := TCompilerTarget.Create;
     133  NewItem.Vendor := Vendor;
     134  NewItem.Model := Model;
     135  NewItem.Architecture := Architecture;
     136  inherited Add(NewItem);
     137end;
     138
    105139end.
Note: See TracChangeset for help on using the changeset viewer.