xo-reader: bugfix: w/ expect_formal_xs need push expect_symbol_xs

This commit is contained in:
Roland Conybeare 2024-08-18 11:12:48 -04:00
commit e43d3536c0

View file

@ -5,6 +5,7 @@
#include "expect_formal_arglist_xs.hpp"
#include "expect_formal_xs.hpp"
#include "expect_symbol_xs.hpp"
#include "xo/expression/Variable.hpp"
#include "xo/indentlog/print/vector.hpp"
@ -46,7 +47,9 @@ namespace xo {
{
if (farglxs_type_ == formalarglstatetype::argl_0) {
this->farglxs_type_ = formalarglstatetype::argl_1a;
/* TODO: refactor to have setup method on each exprstate */
p_stack->push_exprstate(expect_formal_xs::make());
p_stack->push_exprstate(expect_symbol_xs::expect_symbol_expression());
} else {
exprstate::on_leftparen_token(tk, p_stack, p_emit_expr);
}