xo-reader: refactor: rename exprstate.on_colon() -> on_colon_token

This commit is contained in:
Roland Conybeare 2024-08-09 13:12:01 -04:00
commit 1fcac9485b
8 changed files with 21 additions and 9 deletions

View file

@ -60,7 +60,8 @@ namespace xo {
virtual void on_typedescr(TypeDescr td,
exprstatestack * /*p_stack*/,
rp<Expression> * /*p_emit_expr*/) override;
virtual void on_colon(exprstatestack * p_stack) override;
virtual void on_colon_token(const token_type & tk,
exprstatestack * p_stack) override;
virtual void on_semicolon(exprstatestack * p_stack,
rp<Expression> * /*p_emit_expr*/) override;
virtual void on_singleassign(exprstatestack * p_stack) override;

View file

@ -131,7 +131,9 @@ namespace xo {
virtual void on_symbol_token(const token_type & tk,
exprstatestack * p_stack,
rp<Expression> * p_emit_expr);
virtual void on_colon(exprstatestack * p_stack);
/** handle incoming ':' token **/
virtual void on_colon_token(const token_type & tk,
exprstatestack * p_stack);
virtual void on_semicolon(exprstatestack * p_stack,
rp<Expression> * p_emit_expr);
virtual void on_singleassign(exprstatestack * p_stack);

View file

@ -56,7 +56,8 @@ namespace xo {
virtual void on_symbol_token(const token_type & tk,
exprstatestack * p_stack,
rp<Expression> * p_emit_expr) override;
virtual void on_colon(exprstatestack * p_stack) override;
virtual void on_colon_token(const token_type & tk,
exprstatestack * p_stack) override;
virtual void on_semicolon(exprstatestack * p_stack,
rp<Expression> * /*p_emit_expr*/) override;
virtual void on_singleassign(exprstatestack * p_stack) override;

View file

@ -43,7 +43,8 @@ namespace xo {
virtual void on_typedescr(TypeDescr td,
exprstatestack * /*p_stack*/,
rp<Expression> * /*p_emit_expr*/) override;
virtual void on_colon(exprstatestack * p_stack) override;
virtual void on_colon_token(const token_type & tk,
exprstatestack * p_stack) override;
virtual void on_semicolon(exprstatestack * p_stack,
rp<Expression> * /*p_emit_expr*/) override;
virtual void on_singleassign(exprstatestack * p_stack) override;

View file

@ -326,7 +326,9 @@ namespace xo {
}
void
define_xs::on_colon(exprstatestack * p_stack) {
define_xs::on_colon_token(const token_type & /*tk*/,
exprstatestack * p_stack)
{
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));

View file

@ -504,7 +504,9 @@ namespace xo {
}
void
exprstate::on_colon(exprstatestack * /*p_stack*/) {
exprstate::on_colon_token(const token_type & /*tk*/,
exprstatestack * /*p_stack*/)
{
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));
@ -686,7 +688,7 @@ namespace xo {
return;
case tokentype::tk_colon:
this->on_colon(p_stack);
this->on_colon_token(tk, p_stack);
return;
case tokentype::tk_doublecolon:

View file

@ -108,7 +108,8 @@ namespace xo {
}
void
paren_xs::on_colon(exprstatestack * /*p_stack*/)
paren_xs::on_colon_token(const token_type & /*tk*/,
exprstatestack * /*p_stack*/)
{
constexpr const char * c_self_name = "paren_xs::on_colon";

View file

@ -82,7 +82,9 @@ namespace xo {
}
void
progress_xs::on_colon(exprstatestack * /*p_stack*/) {
progress_xs::on_colon_token(const token_type & /*tk*/,
exprstatestack * /*p_stack*/)
{
constexpr const char * self_name = "progress_xs::on_colon";
throw std::runtime_error(tostr(self_name,