Ignore:
Timestamp:
Jun 4, 2024, 12:22:49 AM (5 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from unit names.
  • Modified: Updated Common package.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/Compiler.pas

    r74 r75  
    1 unit UCompiler;
    2 
    3 {$MODE Delphi}
     1unit Compiler;
    42
    53interface
    64
    75uses
    8   SysUtils, Variants, Classes, Contnrs, FileUtil, UModularSystem, UCompilerAPI,
    9   Dialogs, USourceCodePascal, UProducer, UAnalyzer, SpecializedList, UTarget,
    10   fgl;
     6  SysUtils, Variants, Classes, FileUtil, ModularSystem, CompilerAPI,
     7  Dialogs, SourceCodePascal, Producer, Analyzer, Generics.Collections, Target;
    118
    129type
     
    2017
    2118  TSourceFileManager = class
    22     Files: TListString;
     19    Files: TStringList;
    2320    function LoadStringFromFile(FileName: string): string;
    2421    procedure SaveStringToFile(FileName: string; Content: string);
     
    4542  public
    4643    AbstractCode: TProgram;
    47     ErrorMessages: TFPGObjectList<TErrorMessage>;
     44    ErrorMessages: TObjectList<TErrorMessage>;
    4845    CompiledFolder: string;
    4946
    50     Targets: TListTarget;
    51     Analyzers: TListAnalyzer;
    52     Convertors: TListObject;
    53     Executors: TListObject;
     47    Targets: TTargets;
     48    Analyzers: TAnalyzers;
     49    Convertors: TObjectList<TObject>;
     50    Executors: TObjectList<TObject>;
    5451    API: TCompilerAPI;
    5552    TargetFolder: string;
     
    7370
    7471uses
    75   UAnalyzerPascal;
     72  AnalyzerPascal;
    7673
    7774resourcestring
     
    146143constructor TSourceFileManager.Create;
    147144begin
    148   Files := TListString.Create;
     145  Files := TStringList.Create;
    149146end;
    150147
    151148destructor TSourceFileManager.Destroy;
    152149begin
    153   Files.Free;
    154   inherited Destroy;
     150  FreeAndNil(Files);
     151  inherited;
    155152end;
    156153
     
    168165constructor TCompiler.Create;
    169166begin
    170   Targets := TListTarget.Create;
    171   Analyzers := TListAnalyzer.Create;
    172   Convertors := TListObject.Create;
    173   Executors := TListObject.Create;
     167  Targets := TTargets.Create;
     168  Analyzers := TAnalyzers.Create;
     169  Convertors := TObjectList<TObject>.Create;
     170  Executors := TObjectList<TObject>.Create;
    174171  API := TCompilerAPI.Create;
    175172  API.Compiler := Self;
    176173  AbstractCode := TProgram.Create;
    177   ErrorMessages := TFPGObjectList<TErrorMessage>.Create;
     174  ErrorMessages := TObjectList<TErrorMessage>.Create;
    178175  CompiledFolder := 'Compiled';
    179176  ModuleManager := TModuleManager.Create(nil);
Note: See TracChangeset for help on using the changeset viewer.