Add support for negative constants in external initialisers.
This commit is contained in:
parent
a01523a893
commit
b1576e2c77
|
@ -373,7 +373,15 @@ loop:
|
||||||
return subseq(c,PLUS,INCBEF);
|
return subseq(c,PLUS,INCBEF);
|
||||||
|
|
||||||
case MINUS:
|
case MINUS:
|
||||||
return subseq(c,MINUS,DECBEF);
|
/* avoid peeking a name, which could overwrite
|
||||||
|
* an already set bsym. */
|
||||||
|
if (ctab[peekc = spnextchar()] == DIGIT) {
|
||||||
|
getnum();
|
||||||
|
cval = -cval;
|
||||||
|
return CON;
|
||||||
|
} else {
|
||||||
|
return subseq(c,MINUS,DECBEF);
|
||||||
|
}
|
||||||
|
|
||||||
case LESS:
|
case LESS:
|
||||||
if (subseq(c,0,1))
|
if (subseq(c,0,1))
|
||||||
|
|
Loading…
Reference in a new issue