xo-reader: simplify paren handling for expressions
This commit is contained in:
parent
b8b9efd633
commit
6b9503ef76
4 changed files with 21 additions and 45 deletions
|
|
@ -19,6 +19,9 @@ namespace xo {
|
|||
|
||||
static std::unique_ptr<expect_expr_xs> expect_rhs_expression();
|
||||
|
||||
virtual void on_leftparen_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;
|
||||
|
|
|
|||
|
|
@ -70,11 +70,6 @@ namespace xo {
|
|||
{}
|
||||
virtual ~exprstate() = default;
|
||||
|
||||
#ifdef RELOCATED
|
||||
static std::unique_ptr<exprstate> expect_rhs_expression() {
|
||||
return std::make_unique<exprstate>(exprstate(exprstatetype::expect_rhs_expression));
|
||||
}
|
||||
#endif
|
||||
static std::unique_ptr<exprstate> expect_symbol() {
|
||||
return std::make_unique<exprstate>(exprstate(exprstatetype::expect_symbol));
|
||||
}
|
||||
|
|
@ -96,10 +91,6 @@ namespace xo {
|
|||
virtual bool admits_leftparen() const;
|
||||
/** truee iff this parsing state admits a rightparen ')' as next token **/
|
||||
virtual bool admits_rightparen() const;
|
||||
#ifdef OBSOLETE
|
||||
/** true iff this parsing state admits a 64-bit floating point literal token **/
|
||||
virtual bool admits_f64() const;
|
||||
#endif
|
||||
|
||||
/** update exprstate in response to incoming token @p tk,
|
||||
* forward instructions to parent parser
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue