xo-reader: tidy: kill RELOCATED + OBSOLETE code

This commit is contained in:
Roland Conybeare 2024-08-09 19:45:19 -04:00
commit 6473ab6e26
2 changed files with 0 additions and 67 deletions

View file

@ -41,37 +41,6 @@ namespace xo {
return "???";
}
#ifdef OBSOLETE
bool
exprstate::admits_definition() const {
switch (exs_type_) {
case exprstatetype::expect_toplevel_expression_sequence:
return true;
case exprstatetype::defexpr:
case exprstatetype::parenexpr:
/* unreachable */
assert(false);
return false;
case exprstatetype::expect_rhs_expression:
return false;
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
bool
exprstate::admits_symbol() const {
switch (exs_type_) {
@ -326,31 +295,6 @@ namespace xo {
exprstatestack * /*p_stack*/)
{
this->illegal_input_error("exprstate::on_def_token", tk);
#ifdef OBSOLETE
constexpr bool c_debug_flag = true;
scope log(XO_DEBUG(c_debug_flag));
constexpr const char * c_self_name = "exprstate::on_def_token";
/* lots of illegal states */
if (!this->admits_definition())
{
this->illegal_input_error(c_self_name, tk);
}
p_stack->push_exprstate(define_xs::def_0());
/* todo: replace:
* expect_symbol_or_function_signature()
*/
p_stack->push_exprstate(exprstate::expect_symbol());
/* keyword 'def' introduces a definition:
* def pi : f64 = 3.14159265
* def sq(x : f64) -> f64 { (x * x) }
*/
#endif
}
void