Changeset 207 for branches/interpreter2/UExecutor.pas
- Timestamp:
- Apr 20, 2020, 11:31:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter2/UExecutor.pas
r205 r207 104 104 procedure ExecuteRepeatUntil(Block: TExecutorBlock; RepeatUntil: TRepeatUntil); 105 105 procedure ExecuteForToDo(Block: TExecutorBlock; ForToDo: TForToDo); 106 procedure ExecuteContinue(Block: TExecutorBlock; ContinueCmd: TContinue); 107 procedure ExecuteBreak(Block: TExecutorBlock; BreakCmd: TBreak); 106 108 procedure ExecuteBlock(ParentBlock: TExecutorBlock; Block: TBlock); 107 109 function ExecuteFunctionCall(Block: TExecutorBlock; FunctionCall: TFunctionCall): TValue; … … 435 437 else if Command is TRepeatUntil then ExecuteRepeatUntil(Block, TRepeatUntil(Command)) 436 438 else if Command is TForToDo then ExecuteForToDo(Block, TForToDo(Command)) 439 else if Command is TBreak then ExecuteBreak(Block, TBreak(Command)) 440 else if Command is TContinue then ExecuteContinue(Block, TContinue(Command)) 441 else if Command is TEmptyCommand then 437 442 else raise Exception.Create('Unsupported command type'); 438 443 end; … … 446 451 if Value is TValueBoolean then begin 447 452 if TValueBoolean(Value).Value then ExecuteCommand(Block, IfThenElse.CommandThen) 448 else ExecuteCommand(Block, IfThenElse.CommandElse); 453 else begin 454 if not (IfThenElse.CommandElse is TCommand) then 455 ExecuteCommand(Block, IfThenElse.CommandElse); 456 end; 449 457 end else raise Exception.Create('Expected boolean value.'); 450 458 Value.Free; … … 497 505 end; 498 506 Limit.Free; 507 end; 508 509 procedure TExecutor.ExecuteContinue(Block: TExecutorBlock; 510 ContinueCmd: TContinue); 511 begin 512 513 end; 514 515 procedure TExecutor.ExecuteBreak(Block: TExecutorBlock; BreakCmd: TBreak); 516 begin 517 499 518 end; 500 519
Note:
See TracChangeset
for help on using the changeset viewer.