Changeset 48 for trunk/Target/UTargetDelphi.pas
- Timestamp:
- Jul 12, 2012, 9:15:02 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetDelphi.pas
r41 r48 29 29 Name := 'Delphi'; 30 30 SourceExtension := '.pas'; 31 ImageIndex := 22; 31 32 CompiledExtension := '.exe'; 32 33 Capabilities := [tcCompile, tcRun]; … … 49 50 Inc(I) 50 51 end; 52 end; 53 54 function CheckClear: Boolean; 55 begin 56 Result := (FSourceCode[I] = '[') and (Length(FSourceCode) >= I + 2) and 57 (FSourceCode[I + 1] = '-') and (FSourceCode[I + 2] = ']'); 51 58 end; 52 59 … … 89 96 ',': AddLine('Read(ReadChar); Memory[Pos] := Ord(ReadChar);'); 90 97 '[': begin 91 AddLine('while Memory[Pos] <> 0 do begin'); 92 Inc(Indent); 98 if CheckClear then begin 99 AddLine('Memory[Pos] := 0;'); 100 Inc(I, 2); 101 end else begin 102 AddLine('while Memory[Pos] <> 0 do begin'); 103 Inc(Indent); 104 end; 93 105 end; 94 106 ']': begin
Note:
See TracChangeset
for help on using the changeset viewer.