xo-reader: rename+: exprstate.on_def() -> on_def_token() + token arg

This commit is contained in:
Roland Conybeare 2024-08-09 13:42:50 -04:00
commit 60a7ec1cd0
6 changed files with 17 additions and 11 deletions

View file

@ -320,7 +320,8 @@ namespace xo {
}
void
exprstate::on_def(exprstatestack * p_stack) {
exprstate::on_def_token(const token_type & /*tk*/,
exprstatestack * p_stack) {
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));
@ -652,7 +653,7 @@ namespace xo {
switch (tk.tk_type()) {
case tokentype::tk_def:
this->on_def(p_stack);
this->on_def_token(tk, p_stack);
return;
case tokentype::tk_i64:

View file

@ -73,7 +73,9 @@ namespace xo {
}
void
paren_xs::on_def(exprstatestack * /*p_stack*/) {
paren_xs::on_def_token(const token_type & /*tk*/,
exprstatestack * /*p_stack*/)
{
constexpr const char * c_self_name = "paren_xs::on_def";
throw std::runtime_error(tostr(c_self_name,

View file

@ -43,7 +43,9 @@ namespace xo {
progress_xs::admits_f64() const { return false; }
void
progress_xs::on_def(exprstatestack * /*p_stack*/) {
progress_xs::on_def_token(const token_type & /*tk*/,
exprstatestack * /*p_stack*/)
{
constexpr const char * self_name = "progress_xs::on_def";
/* nothing here - admits_definition unconditionally false */