xo-interpreter: handle assignment expressions
This commit is contained in:
parent
2bffef29d5
commit
7b49d3da88
7 changed files with 103 additions and 15 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue