Ignore:
Timestamp:
Feb 18, 2012, 7:49:17 PM (12 years ago)
Author:
chronos
Message:
  • Renamed: Compilers renamed to Targets. Interpretter will be one of possible targets.
Location:
trunk/Target
Files:
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Target/UTarget.pas

    r29 r30  
    1 unit UCompiler;
     1unit UTarget;
    22
    33{$mode Delphi}{$H+}
     
    1212  TCompilerOptimization = (coNone, coNormal);
    1313
    14   { TBrainFuckCompiler }
     14  { TTarget }
    1515
    16   TBrainFuckCompiler = class
     16  TTarget = class
    1717  protected
    1818    Indent: Integer;
     
    3636  end;
    3737
    38   { TCompilerList }
     38  { TTargetList }
    3939
    40   TCompilerList = class(TListObject)
     40  TTargetList = class(TListObject)
    4141    procedure LoadFromRegistry(Root: HKEY; Key: string);
    4242    procedure SaveToRegistry(Root: HKEY; Key: string);
     
    5252
    5353
    54 { TCompilerList }
     54{ TTargetList }
    5555
    56 procedure TCompilerList.LoadFromRegistry(Root: HKEY; Key: string);
     56procedure TTargetList.LoadFromRegistry(Root: HKEY; Key: string);
    5757var
    5858  I: Integer;
     
    6363    OpenKey(Key + '\Compiler', True);
    6464    for I := 0 to Count - 1 do
    65     with TBrainFuckCompiler(Items[I]) do
     65    with TTarget(Items[I]) do
    6666      if ValueExists(Name) then CompilerPath := ReadString(Name);
    6767  finally
     
    7070end;
    7171
    72 procedure TCompilerList.SaveToRegistry(Root: HKEY; Key: string);
     72procedure TTargetList.SaveToRegistry(Root: HKEY; Key: string);
    7373var
    7474  I: Integer;
     
    7979    OpenKey(Key + '\Compiler', True);
    8080    for I := 0 to Count - 1 do
    81     with TBrainFuckCompiler(Items[I]) do
     81    with TTarget(Items[I]) do
    8282      if CompilerPath <> '' then WriteString(Name, CompilerPath)
    8383        else DeleteValue(Name);
     
    8787end;
    8888
    89 { TBrainFuckCompiler }
     89{ TTarget }
    9090
    91 procedure TBrainFuckCompiler.AddLine(Text: string);
     91procedure TTarget.AddLine(Text: string);
    9292begin
    9393  Output := Output + DupeString('  ', Indent) + Text + LineEnding;
    9494end;
    9595
    96 function TBrainFuckCompiler.LongFileName(FileName: string): string;
     96function TTarget.LongFileName(FileName: string): string;
    9797begin
    9898  Result := FileName;
     
    105105end;
    106106
    107 constructor TBrainFuckCompiler.Create;
     107constructor TTarget.Create;
    108108begin
    109109  Optimization := coNormal;
    110110end;
    111111
    112 procedure TBrainFuckCompiler.OptimizeSource;
     112procedure TTarget.OptimizeSource;
    113113begin
    114114  // Remove redundand code
     
    116116end;
    117117
    118 procedure TBrainFuckCompiler.Compile;
     118procedure TTarget.Compile;
    119119begin
    120120
    121121end;
    122122
    123 procedure TBrainFuckCompiler.CompileToFile;
     123procedure TTarget.CompileToFile;
    124124var
    125125  Process: TProcess;
     
    149149end;
    150150
    151 procedure TBrainFuckCompiler.Run;
     151procedure TTarget.Run;
    152152var
    153153  CompiledFile: string;
Note: See TracChangeset for help on using the changeset viewer.