Ignore:
Timestamp:
Nov 4, 2016, 9:17:57 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Use generic lists in supported analyzers and parsers.
  • Fixed: Build under Delphi.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dcomp/CmdLine/dcomp.dpr

    r92 r93  
    11program dcomp;
    22
     3{$APPTYPE CONSOLE}
     4
    35uses
    4   UCompiler, UTargetPHP, UAnalyzerPascal;
     6  System.SysUtils,
     7  UCompiler in 'Compiler\UCompiler.pas',
     8  UTargetPHP in 'TargetPHP\UTargetPHP.pas',
     9  UAnalyzerPascal in 'Compiler\UAnalyzerPascal.pas',
     10  UAnalyzer in 'Compiler\UAnalyzer.pas',
     11  UTarget in 'Compiler\UTarget.pas';
    512
     13type
     14  TApplication = class
     15    procedure Run;
     16  end;
     17
     18{ TApplication }
     19
     20procedure TApplication.Run;
    621var
    722  Compiler: TCompiler;
    823begin
    924  Compiler := TCompiler.Create;
     25  if ParamCount > 0 then
     26    Compiler.MainSourceFile := ParamStr(1);
    1027  Compiler.RegisterTarget(TTargetPHP);
    1128  Compiler.RegisterAnalyzer(TAnalyzerPascal);
    1229  Compiler.Compile;
    13   Compiler.Free;
     30end;
     31
     32var
     33  Application: TApplication;
     34begin
     35  try
     36    Application := TApplication.Create;
     37    Application.Run;
     38    Application.Free;
     39    ReadLn;
     40    { TODO -oUser -cConsole Main : Insert code here }
     41  except
     42    on E: Exception do
     43      Writeln(E.ClassName, ': ', E.Message);
     44  end;
    1445end.
     46
Note: See TracChangeset for help on using the changeset viewer.