xo-reader: refactor: use parsestatemachine w/ on_symbol_token()

This commit is contained in:
Roland Conybeare 2024-08-19 01:03:18 -04:00
commit bda115037b
14 changed files with 30 additions and 31 deletions

View file

@ -67,12 +67,13 @@ namespace xo {
void
exprstate::on_symbol_token(const token_type & tk,
exprstatestack * p_stack,
rp<Expression> * /*p_emit_expr*/)
parserstatemachine * p_psm)
{
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));
auto p_stack = p_psm->p_stack_;
log && log(xtag("exstype", p_stack->top_exprstate().exs_type()));
constexpr const char * c_self_name = "exprstate::on_symbol_token";
@ -279,7 +280,7 @@ namespace xo {
return;
case tokentype::tk_symbol:
this->on_symbol_token(tk, p_stack, p_emit_expr);
this->on_symbol_token(tk, p_psm);
return;
case tokentype::tk_leftparen: