xo-reader: bugfix: missed expect_symbol_xs.start() + utest to reveal

This commit is contained in:
Roland Conybeare 2024-08-19 00:15:58 -04:00
commit 2df98cc029
2 changed files with 3 additions and 1 deletions

View file

@ -82,6 +82,7 @@ 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);
}

View file

@ -16,7 +16,8 @@ namespace xo {
{"def foo : f64 = 3.14159265;"},
{"def foo : f64 = (3.14159265);"},
//{"def foo : f64 = 2.0 * 3.14159265;"},
{"def foo = lambda (x : f64) 3.1415965;"}
{"def foo = lambda (x : f64) 3.1415965;"},
{"def foo = lambda (x : f64, y : f64) 3.1415965;"}
};
}