Allow arithmetic on variable values.

This commit is contained in:
David Given 2022-08-08 22:02:51 +02:00
parent f2a49ff3ab
commit 3716d49cd9

View file

@ -86,6 +86,9 @@ char* remember(char* s)
int combine(int typ1, int typ2, int op)
{
typ1 &= ~S_VAR;
typ2 &= ~S_VAR;
switch (op)
{
case '+':
@ -112,6 +115,7 @@ int combine(int typ1, int typ2, int op)
return (S_ABS);
break;
}
fprintf(stderr, "typ1=%d typ2=%d pass=%d\n", typ1, typ2, pass);
if (pass != PASS_1)
serror("illegal operator");
return (S_UND);