Last change
on this file was 18, checked in by chronos, 12 years ago |
- Used external packages are now stored in uncompressed form rather in zipped files. This allow better package version synchronisation.
|
File size:
1.2 KB
|
Line | |
---|
1 | unit ULDModuleBrainfuck;
|
---|
2 |
|
---|
3 | {$mode delphi}{$H+}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, UModularSystem, USource;
|
---|
9 |
|
---|
10 | type
|
---|
11 |
|
---|
12 | { TLDModuleBrainfuck }
|
---|
13 |
|
---|
14 | TLDModuleBrainfuck = class(TModule)
|
---|
15 | private
|
---|
16 | BFFileType: TSourceType;
|
---|
17 | public
|
---|
18 | constructor Create(Owner: TComponent); override;
|
---|
19 | procedure Install; override;
|
---|
20 | procedure Uninstall; override;
|
---|
21 | end;
|
---|
22 |
|
---|
23 |
|
---|
24 | implementation
|
---|
25 |
|
---|
26 | uses
|
---|
27 | ULDStudioAPI;
|
---|
28 |
|
---|
29 | resourcestring
|
---|
30 | SBrainfuck = 'Brainfuck';
|
---|
31 |
|
---|
32 | { TLDModuleBrainfuck }
|
---|
33 |
|
---|
34 | constructor TLDModuleBrainfuck.Create(Owner: TComponent);
|
---|
35 | begin
|
---|
36 | inherited;
|
---|
37 | Identification := 'Brainfuck';
|
---|
38 | Title := SBrainfuck;
|
---|
39 | Version := '0.1';
|
---|
40 | License := 'GNU/LGPLv3';
|
---|
41 | Dependencies.Add('Basic');
|
---|
42 | end;
|
---|
43 |
|
---|
44 | procedure TLDModuleBrainfuck.Install;
|
---|
45 | begin
|
---|
46 | with TLDStudioAPI(API) do begin
|
---|
47 | BFFileType := TSourceType.Create;
|
---|
48 | BFFileType.Extension := '.b';
|
---|
49 | BFFileType.Title := 'Brainfuck source';
|
---|
50 | RegisterFileType(BFFileType);
|
---|
51 | end;
|
---|
52 | inherited Install;
|
---|
53 | end;
|
---|
54 |
|
---|
55 | procedure TLDModuleBrainfuck.Uninstall;
|
---|
56 | begin
|
---|
57 | inherited Uninstall;
|
---|
58 | with TLDStudioAPI(API) do begin
|
---|
59 | UnregisterFileType(BFFileType);
|
---|
60 | BFFileType.Free;
|
---|
61 | end;
|
---|
62 | end;
|
---|
63 |
|
---|
64 | end.
|
---|
65 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.