xo-reader2: bugfix: prior refactor requires switch remodel on_token

This commit is contained in:
Roland Conybeare 2026-01-25 10:47:28 -05:00
commit 8b63fbaaa2
5 changed files with 43 additions and 42 deletions

View file

@ -500,43 +500,43 @@ namespace xo {
switch (tk.tk_type()) { switch (tk.tk_type()) {
case tokentype::tk_symbol: case tokentype::tk_symbol:
this->on_symbol_token(tk, p_psm); this->on_symbol_token(tk, p_psm);
break; return;
case tokentype::tk_def: case tokentype::tk_def:
this->on_def_token(tk, p_psm); this->on_def_token(tk, p_psm);
break; return;
case tokentype::tk_if: case tokentype::tk_if:
this->on_if_token(tk, p_psm); this->on_if_token(tk, p_psm);
break; return;
case tokentype::tk_colon: case tokentype::tk_colon:
this->on_colon_token(tk, p_psm); this->on_colon_token(tk, p_psm);
break; return;
case tokentype::tk_singleassign: case tokentype::tk_singleassign:
this->on_singleassign_token(tk, p_psm); this->on_singleassign_token(tk, p_psm);
break; return;
case tokentype::tk_string: case tokentype::tk_string:
this->on_string_token(tk, p_psm); this->on_string_token(tk, p_psm);
break; return;
case tokentype::tk_f64: case tokentype::tk_f64:
this->on_f64_token(tk, p_psm); this->on_f64_token(tk, p_psm);
break; return;
case tokentype::tk_i64: case tokentype::tk_i64:
this->on_i64_token(tk, p_psm); this->on_i64_token(tk, p_psm);
break; return;
case tokentype::tk_bool: case tokentype::tk_bool:
this->on_bool_token(tk, p_psm); this->on_bool_token(tk, p_psm);
break; return;
case tokentype::tk_semicolon: case tokentype::tk_semicolon:
this->on_semicolon_token(tk, p_psm); this->on_semicolon_token(tk, p_psm);
break; return;
// all the not-yet handled cases // all the not-yet handled cases
case tokentype::tk_invalid: case tokentype::tk_invalid:
@ -569,12 +569,11 @@ namespace xo {
case tokentype::tk_in: case tokentype::tk_in:
case tokentype::tk_end: case tokentype::tk_end:
case tokentype::N: case tokentype::N:
break; p_psm->illegal_input_on_token("DDefineSsm::on_token",
tk,
this->get_expect_str());
return;
} }
p_psm->illegal_input_on_token("DDefineSsm::on_token",
tk,
this->get_expect_str());
} }
void void

View file

@ -170,12 +170,12 @@ namespace xo {
case tokentype::tk_in: case tokentype::tk_in:
case tokentype::tk_end: case tokentype::tk_end:
case tokentype::N: case tokentype::N:
p_psm->illegal_input_on_token("DExpectSymbolSsm::on_token",
tk,
this->get_expect_str());
break; break;
} }
p_psm->illegal_input_on_token("DExpectSymbolSsm::on_token",
tk,
this->get_expect_str());
} }
void void

View file

@ -134,12 +134,11 @@ namespace xo {
case tokentype::tk_in: case tokentype::tk_in:
case tokentype::tk_end: case tokentype::tk_end:
case tokentype::N: case tokentype::N:
p_psm->illegal_input_on_token("DExpectTypeSsm::on_token",
tk,
this->get_expect_str());
break; break;
} }
p_psm->illegal_input_on_token("DExpectTypeSsm::on_token",
tk,
this->get_expect_str());
} }
void void

View file

@ -114,43 +114,43 @@ namespace xo {
switch (tk.tk_type()) { switch (tk.tk_type()) {
case tokentype::tk_symbol: case tokentype::tk_symbol:
this->on_symbol_token(tk, p_psm); this->on_symbol_token(tk, p_psm);
break; return;
case tokentype::tk_def: case tokentype::tk_def:
this->on_def_token(tk, p_psm); this->on_def_token(tk, p_psm);
break; return;
case tokentype::tk_if: case tokentype::tk_if:
this->on_if_token(tk, p_psm); this->on_if_token(tk, p_psm);
break; return;
case tokentype::tk_colon: case tokentype::tk_colon:
this->on_colon_token(tk, p_psm); this->on_colon_token(tk, p_psm);
break; return;
case tokentype::tk_singleassign: case tokentype::tk_singleassign:
this->on_singleassign_token(tk, p_psm); this->on_singleassign_token(tk, p_psm);
break; return;
case tokentype::tk_string: case tokentype::tk_string:
this->on_string_token(tk, p_psm); this->on_string_token(tk, p_psm);
break; return;
case tokentype::tk_f64: case tokentype::tk_f64:
this->on_f64_token(tk, p_psm); this->on_f64_token(tk, p_psm);
break; return;
case tokentype::tk_i64: case tokentype::tk_i64:
this->on_i64_token(tk, p_psm); this->on_i64_token(tk, p_psm);
break; return;
case tokentype::tk_bool: case tokentype::tk_bool:
this->on_bool_token(tk, p_psm); this->on_bool_token(tk, p_psm);
break; return;
case tokentype::tk_semicolon: case tokentype::tk_semicolon:
this->on_semicolon_token(tk, p_psm); this->on_semicolon_token(tk, p_psm);
break; return;
// all the not-yet handled cases // all the not-yet handled cases
case tokentype::tk_invalid: case tokentype::tk_invalid:

View file

@ -167,43 +167,43 @@ namespace xo {
switch (tk.tk_type()) { switch (tk.tk_type()) {
case tokentype::tk_symbol: case tokentype::tk_symbol:
this->on_symbol_token(tk, p_psm); this->on_symbol_token(tk, p_psm);
break; return;
case tokentype::tk_def: case tokentype::tk_def:
this->on_def_token(tk, p_psm); this->on_def_token(tk, p_psm);
break; return;
case tokentype::tk_if: case tokentype::tk_if:
this->on_if_token(tk, p_psm); this->on_if_token(tk, p_psm);
break; return;
case tokentype::tk_colon: case tokentype::tk_colon:
this->on_colon_token(tk, p_psm); this->on_colon_token(tk, p_psm);
break; return;
case tokentype::tk_singleassign: case tokentype::tk_singleassign:
this->on_singleassign_token(tk, p_psm); this->on_singleassign_token(tk, p_psm);
break; return;
case tokentype::tk_string: case tokentype::tk_string:
this->on_string_token(tk, p_psm); this->on_string_token(tk, p_psm);
break; return;
case tokentype::tk_f64: case tokentype::tk_f64:
this->on_f64_token(tk, p_psm); this->on_f64_token(tk, p_psm);
break; return;
case tokentype::tk_i64: case tokentype::tk_i64:
this->on_i64_token(tk, p_psm); this->on_i64_token(tk, p_psm);
break; return;
case tokentype::tk_bool: case tokentype::tk_bool:
this->on_bool_token(tk, p_psm); this->on_bool_token(tk, p_psm);
break; return;
case tokentype::tk_semicolon: case tokentype::tk_semicolon:
this->on_semicolon_token(tk, p_psm); this->on_semicolon_token(tk, p_psm);
break; return;
// all the not-yet handled cases // all the not-yet handled cases
case tokentype::tk_invalid: case tokentype::tk_invalid:
@ -224,7 +224,10 @@ namespace xo {
case tokentype::tk_yields: case tokentype::tk_yields:
case tokentype::tk_plus: case tokentype::tk_plus:
case tokentype::tk_minus: case tokentype::tk_minus:
break;
case tokentype::tk_star: case tokentype::tk_star:
this->on_operator_token(tk, p_psm);
return;
case tokentype::tk_slash: case tokentype::tk_slash:
case tokentype::tk_cmpeq: case tokentype::tk_cmpeq:
case tokentype::tk_cmpne: case tokentype::tk_cmpne: