xo-reader: simplify: adopt exprseq_xs + drop .admits_definition()
This commit is contained in:
parent
04f79eaf01
commit
424a4cd0f1
11 changed files with 39 additions and 3 deletions
|
|
@ -42,7 +42,9 @@ namespace xo {
|
|||
|
||||
defexprstatetype defxs_type() const { return defxs_type_; }
|
||||
|
||||
#ifdef OBSOLETE
|
||||
virtual bool admits_definition() const override;
|
||||
#endif
|
||||
virtual bool admits_symbol() const override;
|
||||
virtual bool admits_colon() const override;
|
||||
virtual bool admits_semicolon() const override;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ namespace xo {
|
|||
*
|
||||
**/
|
||||
class exprseq_xs : public exprstate {
|
||||
public:
|
||||
exprseq_xs();
|
||||
|
||||
static std::unique_ptr<exprseq_xs> expect_toplevel_expression_sequence();
|
||||
|
||||
public:
|
||||
// ----- token input methods -----
|
||||
|
||||
|
|
|
|||
|
|
@ -70,9 +70,11 @@ namespace xo {
|
|||
{}
|
||||
virtual ~exprstate() = default;
|
||||
|
||||
#ifdef RELOCATED
|
||||
static std::unique_ptr<exprstate> expect_toplevel_expression_sequence() {
|
||||
return std::make_unique<exprstate>(exprstate(exprstatetype::expect_toplevel_expression_sequence));
|
||||
}
|
||||
#endif
|
||||
static std::unique_ptr<exprstate> expect_rhs_expression() {
|
||||
return std::make_unique<exprstate>(exprstate(exprstatetype::expect_rhs_expression));
|
||||
}
|
||||
|
|
@ -85,10 +87,12 @@ namespace xo {
|
|||
|
||||
exprstatetype exs_type() const { return exs_type_; }
|
||||
|
||||
#ifdef OBSOLETE
|
||||
/** true iff this parsing state admits a 'def' keyword
|
||||
* as next token
|
||||
**/
|
||||
virtual bool admits_definition() const;
|
||||
#endif
|
||||
/** true iff this parsing state admits a symbol as next token **/
|
||||
virtual bool admits_symbol() const;
|
||||
/** true iff this parsing state admits a colon as next token **/
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ namespace xo {
|
|||
|
||||
static std::unique_ptr<paren_xs> lparen_0();
|
||||
|
||||
#ifdef OBSOLETE
|
||||
virtual bool admits_definition() const override;
|
||||
#endif
|
||||
virtual bool admits_symbol() const override;
|
||||
virtual bool admits_colon() const override;
|
||||
virtual bool admits_semicolon() const override;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ namespace xo {
|
|||
|
||||
static std::unique_ptr<progress_xs> make(rp<Expression> valex);
|
||||
|
||||
#ifdef OBSOLETE
|
||||
virtual bool admits_definition() const override;
|
||||
#endif
|
||||
virtual bool admits_symbol() const override;
|
||||
virtual bool admits_colon() const override;
|
||||
virtual bool admits_semicolon() const override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue