mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Handle block sub-expressions that produce results.
This commit is contained in:
parent
16e013ff5d
commit
ff6e2584da
1 changed files with 11 additions and 1 deletions
|
@ -276,6 +276,16 @@ statement_assign (sblock_t *sblock, expr_t *e)
|
|||
return sblock;
|
||||
}
|
||||
|
||||
static sblock_t *
|
||||
expr_block (sblock_t *sblock, expr_t *e, operand_t **op)
|
||||
{
|
||||
if (!e->e.block.result)
|
||||
internal_error (e, "block sub-expression without result");
|
||||
sblock = statement_slist (sblock, e->e.block.head);
|
||||
sblock = statement_subexpr (sblock, e->e.block.result, op);
|
||||
return sblock;
|
||||
}
|
||||
|
||||
static sblock_t *
|
||||
expr_expr (sblock_t *sblock, expr_t *e, operand_t **op)
|
||||
{
|
||||
|
@ -341,7 +351,7 @@ statement_subexpr (sblock_t *sblock, expr_t *e, operand_t **op)
|
|||
0, // ex_state
|
||||
0, // ex_bool
|
||||
0, // ex_label
|
||||
0, // ex_block
|
||||
expr_block, // ex_block
|
||||
expr_expr,
|
||||
expr_uexpr,
|
||||
expr_symbol,
|
||||
|
|
Loading…
Reference in a new issue