Closed yenatch closed 5 years ago
This seems to be caused by the two following lines (T_ID
can be a const
, so it is ambiguous):
I added the second line (even though I knew there was a syntax conflict) to fix another problem. If you subtract two labels, the result is known if:
However, without the check, this would also work in the following case:
However, I'd swear I've seen this problem long before the patch that introduced the check.
Yes, this bug has always been there: http://gbdev.gg8.se/wiki/articles/RGBDS
Subtracting a numeric constant from a data structure symbol (rb, rw, ...) produces a parse error. It's still possible, however, to add a negative number.
I've made a couple test cases for this parser issue bug222test1.s.txt bug222test2.s.txt
been meaning to report this for some time. either of the following produce a syntax error:
the following does work however: