Changeset 93 for branches/dcomp/CmdLine/dcomp.dpr
- Timestamp:
- Nov 4, 2016, 9:17:57 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dcomp/CmdLine/dcomp.dpr
r92 r93 1 1 program dcomp; 2 2 3 {$APPTYPE CONSOLE} 4 3 5 uses 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'; 5 12 13 type 14 TApplication = class 15 procedure Run; 16 end; 17 18 { TApplication } 19 20 procedure TApplication.Run; 6 21 var 7 22 Compiler: TCompiler; 8 23 begin 9 24 Compiler := TCompiler.Create; 25 if ParamCount > 0 then 26 Compiler.MainSourceFile := ParamStr(1); 10 27 Compiler.RegisterTarget(TTargetPHP); 11 28 Compiler.RegisterAnalyzer(TAnalyzerPascal); 12 29 Compiler.Compile; 13 Compiler.Free; 30 end; 31 32 var 33 Application: TApplication; 34 begin 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; 14 45 end. 46
Note:
See TracChangeset
for help on using the changeset viewer.