xo-reader: tidy: rename expstate.on_symbol() -> on_symbol_token()
This commit is contained in:
parent
b813e55194
commit
49cb0f0bba
6 changed files with 32 additions and 21 deletions
|
|
@ -18,15 +18,24 @@ namespace xo {
|
|||
/** toplevel of some translation unit **/
|
||||
expect_toplevel_expression_sequence,
|
||||
|
||||
/** handle define-expression
|
||||
* see @ref define_xs
|
||||
**/
|
||||
defexpr,
|
||||
|
||||
/* handle parenthesized expression */
|
||||
/** handle parenthesized expression
|
||||
* see @ref paren_xs
|
||||
**/
|
||||
parenexpr,
|
||||
|
||||
expect_rhs_expression,
|
||||
expect_symbol,
|
||||
expect_type,
|
||||
|
||||
/** handle expression-in-progress,
|
||||
* in case infix operators to follow
|
||||
* see @ref progress_xs
|
||||
**/
|
||||
expr_progress,
|
||||
|
||||
n_exprstatetype
|
||||
|
|
@ -115,11 +124,13 @@ namespace xo {
|
|||
/** print human-readable representation on @p os **/
|
||||
virtual void print(std::ostream & os) const;
|
||||
|
||||
public:
|
||||
// ----- input methods -----
|
||||
|
||||
virtual void on_def(exprstatestack * p_stack);
|
||||
virtual void on_symbol(const token_type & tk,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr);
|
||||
/** handle incoming symbol token **/
|
||||
virtual void on_symbol_token(const token_type & tk,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr);
|
||||
virtual void on_colon(exprstatestack * p_stack);
|
||||
virtual void on_semicolon(exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr);
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ namespace xo {
|
|||
exprstatestack * /*p_stack*/,
|
||||
rp<Expression> * /*p_emit_expr*/) override;
|
||||
|
||||
virtual void on_symbol(const token_type & tk,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr) override;
|
||||
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_semicolon(exprstatestack * p_stack,
|
||||
rp<Expression> * /*p_emit_expr*/) override;
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ namespace xo {
|
|||
virtual void on_expr(ref::brw<Expression> expr,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr) override;
|
||||
virtual void on_symbol(const token_type & tk,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr) override;
|
||||
virtual void on_symbol_token(const token_type & tk,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr) override;
|
||||
virtual void on_typedescr(TypeDescr td,
|
||||
exprstatestack * /*p_stack*/,
|
||||
rp<Expression> * /*p_emit_expr*/) override;
|
||||
|
|
|
|||
|
|
@ -348,9 +348,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
exprstate::on_symbol(const token_type & tk,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr)
|
||||
exprstate::on_symbol_token(const token_type & tk,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * p_emit_expr)
|
||||
{
|
||||
constexpr bool c_debug_flag = true;
|
||||
scope log(XO_DEBUG(c_debug_flag));
|
||||
|
|
@ -662,7 +662,7 @@ namespace xo {
|
|||
return;
|
||||
|
||||
case tokentype::tk_symbol:
|
||||
this->on_symbol(tk, p_stack, p_emit_expr);
|
||||
this->on_symbol_token(tk, p_stack, p_emit_expr);
|
||||
return;
|
||||
|
||||
case tokentype::tk_leftparen:
|
||||
|
|
|
|||
|
|
@ -82,9 +82,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
paren_xs::on_symbol(const token_type & /*tk*/,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * /*p_emit_expr*/)
|
||||
paren_xs::on_symbol_token(const token_type & /*tk*/,
|
||||
exprstatestack * p_stack,
|
||||
rp<Expression> * /*p_emit_expr*/)
|
||||
{
|
||||
constexpr bool c_debug_flag = true;
|
||||
scope log(XO_DEBUG(c_debug_flag));
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ namespace xo {
|
|||
}
|
||||
|
||||
void
|
||||
progress_xs::on_symbol(const token_type & /*tk*/,
|
||||
exprstatestack * /*p_stack*/,
|
||||
rp<Expression> * /*p_emit_expr*/)
|
||||
progress_xs::on_symbol_token(const token_type & /*tk*/,
|
||||
exprstatestack * /*p_stack*/,
|
||||
rp<Expression> * /*p_emit_expr*/)
|
||||
{
|
||||
/* illegal input, e.g.
|
||||
* foo bar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue