xo-reader: parserstatemachine -> consolidate on_expr() args
This commit is contained in:
parent
355f73b2a1
commit
bdf75d5620
14 changed files with 29 additions and 47 deletions
|
|
@ -59,14 +59,13 @@ namespace xo {
|
|||
|
||||
void
|
||||
lambda_xs::on_expr(ref::brw<Expression> expr,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr)
|
||||
parserstatemachine * p_psm)
|
||||
{
|
||||
if (lmxs_type_ == lambdastatetype::lm_2) {
|
||||
this->lmxs_type_ = lambdastatetype::lm_3;
|
||||
this->body_ = expr.promote();
|
||||
} else {
|
||||
exprstate::on_expr(expr, p_stack, p_emit_expr);
|
||||
exprstate::on_expr(expr, p_psm);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +74,6 @@ namespace xo {
|
|||
parserstatemachine * p_psm)
|
||||
{
|
||||
auto p_stack = p_psm->p_stack_;
|
||||
auto p_emit_expr = p_psm->p_emit_expr_;
|
||||
|
||||
if (lmxs_type_ == lambdastatetype::lm_3) {
|
||||
/* done! */
|
||||
|
|
@ -86,7 +84,7 @@ namespace xo {
|
|||
|
||||
rp<Lambda> lm = Lambda::make(name, argl_, body_);
|
||||
|
||||
p_stack->top_exprstate().on_expr(lm, p_stack, p_emit_expr);
|
||||
p_stack->top_exprstate().on_expr(lm, p_psm);
|
||||
p_stack->top_exprstate().on_semicolon_token(tk, p_psm);
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue