xo-reader: simplify expect_expr_xs,expect_lparen_xs using qsm

This commit is contained in:
Roland Conybeare 2024-08-19 16:48:58 -04:00
commit 0b0c424b84
7 changed files with 14 additions and 18 deletions

View file

@ -42,12 +42,10 @@ namespace xo {
lambda_xs::on_formal_arglist(const std::vector<rp<Variable>> & argl,
parserstatemachine * p_psm)
{
auto p_stack = p_psm->p_stack_;
if (lmxs_type_ == lambdastatetype::lm_1) {
this->lmxs_type_ = lambdastatetype::lm_2;
this->argl_ = argl;
expect_expr_xs::start(p_stack);
expect_expr_xs::start(p_psm);
} else {
exprstate::on_formal_arglist(argl, p_psm);
}