Allow arithmetic on variable values.
This commit is contained in:
parent
f2a49ff3ab
commit
3716d49cd9
|
@ -86,6 +86,9 @@ char* remember(char* s)
|
||||||
|
|
||||||
int combine(int typ1, int typ2, int op)
|
int combine(int typ1, int typ2, int op)
|
||||||
{
|
{
|
||||||
|
typ1 &= ~S_VAR;
|
||||||
|
typ2 &= ~S_VAR;
|
||||||
|
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
case '+':
|
case '+':
|
||||||
|
@ -112,6 +115,7 @@ int combine(int typ1, int typ2, int op)
|
||||||
return (S_ABS);
|
return (S_ABS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
fprintf(stderr, "typ1=%d typ2=%d pass=%d\n", typ1, typ2, pass);
|
||||||
if (pass != PASS_1)
|
if (pass != PASS_1)
|
||||||
serror("illegal operator");
|
serror("illegal operator");
|
||||||
return (S_UND);
|
return (S_UND);
|
||||||
|
|
Loading…
Reference in a new issue