xo-reader: bury debris

This commit is contained in:
Roland Conybeare 2024-08-10 23:58:08 -05:00
commit 652a454887
2 changed files with 0 additions and 49 deletions

View file

@ -74,10 +74,6 @@ namespace xo {
/** true iff this parsing state admits a symbol as next token **/
virtual bool admits_symbol() const;
#ifdef OBSOLETE
/** true iff this parsing state admits a singleassign '=' as next token **/
virtual bool admits_singleassign() const;
#endif
/** update exprstate in response to incoming token @p tk,
* forward instructions to parent parser

View file

@ -76,51 +76,6 @@ namespace xo {
return false;
}
#ifdef OBSOLETE
bool
exprstate::admits_singleassign() const {
switch (exs_type_) {
case exprstatetype::expect_toplevel_expression_sequence:
/*
* def foo = 1 ;
* def foo : f64 = 1 ;
* ^ ^ ^ ^ ^ ^ ^
* | | | | | | (done)
* | | | | | def_4:expect_rhs_expression
* | | | | def_3
* | | | def_2:expect_type
* | | def_1
* | def_0:expect_symbol
* expect_toplevel_expression_sequence
*
* note that we skip from def_1 -> def_4 if '=' instead of ':'
*/
case exprstatetype::defexpr:
case exprstatetype::parenexpr:
/* unreachable - redirects to define_xs etrc */
assert(false);
return false;
case exprstatetype::expect_rhs_expression:
case exprstatetype::expect_symbol:
case exprstatetype::expect_type:
return false;
case exprstatetype::expr_progress:
/* unreachable */
assert(false);
return false;
case exprstatetype::invalid:
case exprstatetype::n_exprstatetype:
/* unreachable */
return false;
}
return false;
}
#endif
void
exprstate::on_def_token(const token_type & tk,
exprstatestack * /*p_stack*/)