Changeset 149 for branches/easy compiler/USourceGenerator.pas
- Timestamp:
- Jan 18, 2018, 1:30:58 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/easy compiler/USourceGenerator.pas
r148 r149 120 120 Result := Result + IndentStr + 'repeat' + LineEnding; 121 121 Inc(Indent); 122 Result := Result + IndentStr + GenerateCommand(TCommandRepeat(Command).Command) + LineEnding;122 Result := Result + GenerateCommand(TCommandRepeat(Command).Command); 123 123 Dec(Indent); 124 124 Result := Result + IndentStr + 'until False;' + LineEnding; 125 125 end else 126 126 if Command is TCommandIfEqual then begin 127 Result := Result + IndentStr + 'if ' + GenerateRef(TCommandIfEqual(Command).Reference1) + 128 ' = ' + GenerateRef(TCommandIfEqual(Command).Reference2) + ' then '; 127 Result := Result + IndentStr + 'if ' + 128 GenerateRef(TCommandIfEqual(Command).Reference1) + ' = ' + 129 GenerateRef(TCommandIfEqual(Command).Reference2) + ' then ' + LineEnding; 130 end else 131 if Command is TCommandIfNotEqual then begin 132 Result := Result + IndentStr + 'if ' + 133 GenerateRef(TCommandIfNotEqual(Command).Reference1) + ' <> ' + 134 GenerateRef(TCommandIfNotEqual(Command).Reference2) + ' then ' + LineEnding; 129 135 end else 130 136 raise Exception.Create('Unsupported instruction');
Note:
See TracChangeset
for help on using the changeset viewer.