xo-interpreter: handle assignment expressions

This commit is contained in:
Roland Conybeare 2025-11-25 14:31:05 -05:00
commit 7b49d3da88
7 changed files with 103 additions and 15 deletions

View file

@ -434,6 +434,13 @@ namespace xo {
this->illegal_input_on_token(c_self_name, tk, exp, p_psm);
}
void
progress_xs::on_assign_token(const token_type & tk,
parserstatemachine * p_psm)
{
this->on_operator_token(tk, p_psm);
}
void
progress_xs::on_leftparen_token(const token_type & tk,
parserstatemachine * p_psm)
@ -573,6 +580,8 @@ namespace xo {
optype
tk2op(const tokentype & tktype) {
switch (tktype) {
case tokentype::tk_assign:
return optype::op_assign;
case tokentype::tk_plus:
return optype::op_add;
case tokentype::tk_minus: