xo-reader: streamline exprseq_xs.start() using psm
This commit is contained in:
parent
f5a309d611
commit
c8f166acc8
3 changed files with 8 additions and 4 deletions
|
|
@ -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 -----
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue