chore: merge develop into rc/v11

This commit is contained in:
Maribeth Bottorff
2024-04-01 14:57:19 -07:00
committed by GitHub
34 changed files with 375 additions and 426 deletions

View File

@@ -60,8 +60,17 @@ export function procedures_defreturn(block: Block, generator: PhpGenerator) {
generator.INDENT,
);
}
const branch = generator.statementToCode(block, 'STACK');
let returnValue = generator.valueToCode(block, 'RETURN', Order.NONE) || '';
let branch = '';
if (block.getInput('STACK')) {
// The 'procedures_defreturn' block might not have a STACK input.
branch = generator.statementToCode(block, 'STACK');
}
let returnValue = '';
if (block.getInput('RETURN')) {
// The 'procedures_defnoreturn' block (which shares this code)
// does not have a RETURN input.
returnValue = generator.valueToCode(block, 'RETURN', Order.NONE) || '';
}
let xfix2 = '';
if (branch && returnValue) {
// After executing the function body, revisit this block for the return.