Last change
on this file was 186, checked in by chronos, 6 years ago |
- Added: Partial implementation of compiler to Pascal source.
|
File size:
1.1 KB
|
Line | |
---|
1 | unit UFormCompilerPascal;
|
---|
2 |
|
---|
3 | {$mode delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
---|
9 | SynHighlighterPas, SynEdit, UCompilerPascal;
|
---|
10 |
|
---|
11 | type
|
---|
12 |
|
---|
13 | { TFormCompilerPascal }
|
---|
14 |
|
---|
15 | TFormCompilerPascal = class(TForm)
|
---|
16 | ButtonCompile: TButton;
|
---|
17 | SynEdit1: TSynEdit;
|
---|
18 | SynPasSyn1: TSynPasSyn;
|
---|
19 | procedure ButtonCompileClick(Sender: TObject);
|
---|
20 | procedure FormCreate(Sender: TObject);
|
---|
21 | procedure FormDestroy(Sender: TObject);
|
---|
22 | procedure FormShow(Sender: TObject);
|
---|
23 | private
|
---|
24 |
|
---|
25 | public
|
---|
26 | CompilerPascal: TCompilerPascal;
|
---|
27 | end;
|
---|
28 |
|
---|
29 | var
|
---|
30 | FormCompilerPascal: TFormCompilerPascal;
|
---|
31 |
|
---|
32 | implementation
|
---|
33 |
|
---|
34 | {$R *.lfm}
|
---|
35 |
|
---|
36 | { TFormCompilerPascal }
|
---|
37 |
|
---|
38 | procedure TFormCompilerPascal.ButtonCompileClick(Sender: TObject);
|
---|
39 | begin
|
---|
40 | CompilerPascal.Compile;
|
---|
41 | SynEdit1.Lines.Text := CompilerPascal.Output;
|
---|
42 | end;
|
---|
43 |
|
---|
44 | procedure TFormCompilerPascal.FormCreate(Sender: TObject);
|
---|
45 | begin
|
---|
46 | CompilerPascal := TCompilerPascal.Create;
|
---|
47 | end;
|
---|
48 |
|
---|
49 | procedure TFormCompilerPascal.FormDestroy(Sender: TObject);
|
---|
50 | begin
|
---|
51 | FreeAndNil(CompilerPascal);
|
---|
52 | end;
|
---|
53 |
|
---|
54 | procedure TFormCompilerPascal.FormShow(Sender: TObject);
|
---|
55 | begin
|
---|
56 | ButtonCompile.Click;
|
---|
57 | end;
|
---|
58 |
|
---|
59 | end.
|
---|
60 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.