xo-reader: streamline exprseq_xs.start() using psm

This commit is contained in:
Roland Conybeare 2024-08-19 16:19:23 -04:00
commit c8f166acc8
3 changed files with 8 additions and 4 deletions

View file

@ -18,7 +18,7 @@ namespace xo {
public:
exprseq_xs();
static void start(exprstatestack * p_stack);
static void start(parserstatemachine * p_psm);
public:
// ----- token input methods -----

View file

@ -15,9 +15,9 @@ namespace xo {
}
void
exprseq_xs::start(exprstatestack * p_stack)
exprseq_xs::start(parserstatemachine * p_psm)
{
p_stack->push_exprstate(exprseq_xs::make());
p_psm->push_exprstate(exprseq_xs::make());
}
exprseq_xs::exprseq_xs()

View file

@ -31,7 +31,11 @@ namespace xo {
void
parser::begin_translation_unit() {
exprseq_xs::start(&xs_stack_);
/* note: not using emit expr here */
parserstatemachine psm(&xs_stack_,
nullptr /*p_emit_expr*/);
exprseq_xs::start(&psm);
}
rp<Expression>