xo-reader2: accept parsed expression at top level..
This commit is contained in:
parent
56aceac9e8
commit
8452ef040c
5 changed files with 33 additions and 8 deletions
|
|
@ -288,6 +288,13 @@ namespace xo {
|
|||
stack_->top().on_semicolon_token(tk, this);
|
||||
}
|
||||
|
||||
void
|
||||
ParserStateMachine::capture_result(std::string_view ssm_name,
|
||||
obj<AExpression> expr)
|
||||
{
|
||||
this->result_ = ParserResult::expression(ssm_name, expr);
|
||||
}
|
||||
|
||||
void
|
||||
ParserStateMachine::capture_error(std::string_view ssm_name,
|
||||
const DString * errmsg)
|
||||
|
|
@ -321,7 +328,7 @@ namespace xo {
|
|||
void
|
||||
ParserStateMachine::illegal_input_on_symbol(std::string_view ssm_name,
|
||||
std::string_view sym,
|
||||
std::string_view expect_str)
|
||||
std::string_view expect_str)
|
||||
{
|
||||
// TODO:
|
||||
// - want to write error message using DArena
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue