xo-reader: parsestatemachine.top_exprstate() + use to simplify

This commit is contained in:
Roland Conybeare 2024-08-19 15:55:36 -04:00
commit b988bc6790
11 changed files with 22 additions and 49 deletions

View file

@ -74,8 +74,6 @@ namespace xo {
lambda_xs::on_semicolon_token(const token_type & tk,
parserstatemachine * p_psm)
{
auto p_stack = p_psm->p_stack_;
if (lmxs_type_ == lambdastatetype::lm_3) {
/* done! */
@ -85,8 +83,8 @@ namespace xo {
rp<Lambda> lm = Lambda::make(name, argl_, body_);
p_stack->top_exprstate().on_expr(lm, p_psm);
p_stack->top_exprstate().on_semicolon_token(tk, p_psm);
p_psm->top_exprstate().on_expr(lm, p_psm);
p_psm->top_exprstate().on_semicolon_token(tk, p_psm);
return;
}