Ignore:
Timestamp:
Jul 12, 2012, 9:15:02 AM (12 years ago)
Author:
chronos
Message:
  • Added: Tool button with drop down menu of available targets.
  • Added Target list have icons.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Target/UTargetDelphi.pas

    r41 r48  
    2929  Name := 'Delphi';
    3030  SourceExtension := '.pas';
     31  ImageIndex := 22;
    3132  CompiledExtension := '.exe';
    3233  Capabilities := [tcCompile, tcRun];
     
    4950    Inc(I)
    5051  end;
     52end;
     53
     54function CheckClear: Boolean;
     55begin
     56  Result := (FSourceCode[I] = '[') and (Length(FSourceCode) >= I + 2) and
     57    (FSourceCode[I + 1] = '-') and (FSourceCode[I + 2] = ']');
    5158end;
    5259
     
    8996      ',': AddLine('Read(ReadChar); Memory[Pos] := Ord(ReadChar);');
    9097      '[': 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;
    93105      end;
    94106      ']': begin
Note: See TracChangeset for help on using the changeset viewer.