Changeset 30 for trunk/Target/UTarget.pas
- Timestamp:
- Feb 18, 2012, 7:49:17 PM (12 years ago)
- Location:
- trunk/Target
- Files:
-
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTarget.pas
r29 r30 1 unit U Compiler;1 unit UTarget; 2 2 3 3 {$mode Delphi}{$H+} … … 12 12 TCompilerOptimization = (coNone, coNormal); 13 13 14 { T BrainFuckCompiler}14 { TTarget } 15 15 16 T BrainFuckCompiler= class16 TTarget = class 17 17 protected 18 18 Indent: Integer; … … 36 36 end; 37 37 38 { T CompilerList }38 { TTargetList } 39 39 40 T CompilerList = class(TListObject)40 TTargetList = class(TListObject) 41 41 procedure LoadFromRegistry(Root: HKEY; Key: string); 42 42 procedure SaveToRegistry(Root: HKEY; Key: string); … … 52 52 53 53 54 { T CompilerList }54 { TTargetList } 55 55 56 procedure T CompilerList.LoadFromRegistry(Root: HKEY; Key: string);56 procedure TTargetList.LoadFromRegistry(Root: HKEY; Key: string); 57 57 var 58 58 I: Integer; … … 63 63 OpenKey(Key + '\Compiler', True); 64 64 for I := 0 to Count - 1 do 65 with T BrainFuckCompiler(Items[I]) do65 with TTarget(Items[I]) do 66 66 if ValueExists(Name) then CompilerPath := ReadString(Name); 67 67 finally … … 70 70 end; 71 71 72 procedure T CompilerList.SaveToRegistry(Root: HKEY; Key: string);72 procedure TTargetList.SaveToRegistry(Root: HKEY; Key: string); 73 73 var 74 74 I: Integer; … … 79 79 OpenKey(Key + '\Compiler', True); 80 80 for I := 0 to Count - 1 do 81 with T BrainFuckCompiler(Items[I]) do81 with TTarget(Items[I]) do 82 82 if CompilerPath <> '' then WriteString(Name, CompilerPath) 83 83 else DeleteValue(Name); … … 87 87 end; 88 88 89 { T BrainFuckCompiler}89 { TTarget } 90 90 91 procedure T BrainFuckCompiler.AddLine(Text: string);91 procedure TTarget.AddLine(Text: string); 92 92 begin 93 93 Output := Output + DupeString(' ', Indent) + Text + LineEnding; 94 94 end; 95 95 96 function T BrainFuckCompiler.LongFileName(FileName: string): string;96 function TTarget.LongFileName(FileName: string): string; 97 97 begin 98 98 Result := FileName; … … 105 105 end; 106 106 107 constructor T BrainFuckCompiler.Create;107 constructor TTarget.Create; 108 108 begin 109 109 Optimization := coNormal; 110 110 end; 111 111 112 procedure T BrainFuckCompiler.OptimizeSource;112 procedure TTarget.OptimizeSource; 113 113 begin 114 114 // Remove redundand code … … 116 116 end; 117 117 118 procedure T BrainFuckCompiler.Compile;118 procedure TTarget.Compile; 119 119 begin 120 120 121 121 end; 122 122 123 procedure T BrainFuckCompiler.CompileToFile;123 procedure TTarget.CompileToFile; 124 124 var 125 125 Process: TProcess; … … 149 149 end; 150 150 151 procedure T BrainFuckCompiler.Run;151 procedure TTarget.Run; 152 152 var 153 153 CompiledFile: string;
Note:
See TracChangeset
for help on using the changeset viewer.