xo-reader: refactor: simplify expect_formal_xs api
This commit is contained in:
parent
2df98cc029
commit
0dd66a4bcc
2 changed files with 3 additions and 2 deletions
|
|
@ -55,7 +55,6 @@ namespace xo {
|
|||
this->farglxs_type_ = formalarglstatetype::argl_1a;
|
||||
/* TODO: refactor to have setup method on each exprstate */
|
||||
expect_formal_xs::start(p_stack);
|
||||
expect_symbol_xs::start(p_stack);
|
||||
} else {
|
||||
exprstate::on_leftparen_token(tk, p_stack, p_emit_expr);
|
||||
}
|
||||
|
|
@ -82,7 +81,6 @@ namespace xo {
|
|||
if (farglxs_type_ == formalarglstatetype::argl_1b) {
|
||||
this->farglxs_type_ = formalarglstatetype::argl_1a;
|
||||
expect_formal_xs::start(p_stack);
|
||||
expect_symbol_xs::start(p_stack);
|
||||
} else {
|
||||
exprstate::on_comma_token(tk, p_stack, p_emit_expr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include "expect_formal_xs.hpp"
|
||||
#include "expect_symbol_xs.hpp"
|
||||
#include "expect_type_xs.hpp"
|
||||
#include "xo/expression/Variable.hpp"
|
||||
|
||||
|
|
@ -37,6 +38,8 @@ namespace xo {
|
|||
void
|
||||
expect_formal_xs::start(exprstatestack * p_stack) {
|
||||
p_stack->push_exprstate(expect_formal_xs::make());
|
||||
|
||||
expect_symbol_xs::start(p_stack);
|
||||
}
|
||||
|
||||
expect_formal_xs::expect_formal_xs()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue