Changeset 213 for branches/interpreter2/UGeneratorPhp.pas
- Timestamp:
- Apr 22, 2020, 10:23:31 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter2/UGeneratorPhp.pas
r212 r213 31 31 procedure GenerateExpressionOperand(Block: TBlock; Expression: TExpressionOperand); 32 32 procedure GenerateBreak(Block: TBlock; BreakCmd: TBreak); 33 procedure GenerateReturn(Block: TBlock; Return: TReturn); 33 34 procedure GenerateContinue(Block: TBlock; ContinueCmd: TContinue); 34 35 procedure GenerateValue(Value: TValue); … … 53 54 else if Command is TBreak then GenerateBreak(Block, TBreak(Command)) 54 55 else if Command is TContinue then GenerateContinue(Block, TContinue(Command)) 56 else if Command is TReturn then GenerateReturn(Block, TReturn(Command)) 55 57 else if Command is TEmptyCommand then 56 58 else raise Exception.Create('Unsupported command type'); … … 177 179 begin 178 180 AddText('break'); 181 end; 182 183 procedure TGeneratorPhp.GenerateReturn(Block: TBlock; Return: TReturn); 184 begin 185 AddText('return '); 186 GenerateExpression(Block, Return.Expression); 179 187 end; 180 188
Note:
See TracChangeset
for help on using the changeset viewer.