xo-reader: streamline: simplify expect_expr_xs

This commit is contained in:
Roland Conybeare 2024-08-10 15:56:48 -05:00
commit d1d72f9fc9
4 changed files with 69 additions and 112 deletions

View file

@ -22,10 +22,20 @@ namespace xo {
virtual void on_leftparen_token(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_f64_token(const token_type & tk,
exprstatestack * p_stack,
rp<Expression> * p_emit_expr) override;
/** update exprstate in response to a successfully-parsed subexpression **/
virtual void on_expr(ref::brw<Expression> expr,
exprstatestack * p_stack,
rp<Expression> * p_emit_expr) override;
private:
};

View file

@ -87,12 +87,6 @@ namespace xo {
virtual bool admits_semicolon() const;
/** true iff this parsing state admits a singleassign '=' as next token **/
virtual bool admits_singleassign() const;
#ifdef OBSOLETE
/** true iff this parsing state admits a leftparen '(' as next token **/
virtual bool admits_leftparen() const;
/** truee iff this parsing state admits a rightparen ')' as next token **/
virtual bool admits_rightparen() const;
#endif
/** update exprstate in response to incoming token @p tk,
* forward instructions to parent parser