xo-expression2 xo-reader2: local symtab stack in PSM
This commit is contained in:
parent
298e05dd06
commit
94efaf46cd
27 changed files with 447 additions and 34 deletions
|
|
@ -88,6 +88,20 @@ namespace xo {
|
|||
return stringtable_.intern(str);
|
||||
}
|
||||
|
||||
void
|
||||
ParserStateMachine::push_local_symtab(DLocalSymtab * symtab)
|
||||
{
|
||||
this->local_symtab_ = symtab;
|
||||
}
|
||||
|
||||
void
|
||||
ParserStateMachine::pop_local_symtab()
|
||||
{
|
||||
assert(local_symtab_);
|
||||
|
||||
this->local_symtab_ = local_symtab_->parent();
|
||||
}
|
||||
|
||||
void
|
||||
ParserStateMachine::upsert_var(DVariable * var)
|
||||
{
|
||||
|
|
@ -310,6 +324,12 @@ namespace xo {
|
|||
xtag("expecting", expect_str),
|
||||
xtag("ssm", ssm_name),
|
||||
xtag("via", "ParserStateMachine::illegal_parsed_formal_arglist"));
|
||||
|
||||
assert(expr_alloc_);
|
||||
|
||||
auto errmsg = DString::from_str(expr_alloc_, errmsg_string);
|
||||
|
||||
this->capture_error(ssm_name, errmsg);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue