Closed netux closed 4 years ago
Remember #29? Remember this comment? This is similar to that.
It seems to happen algabraic operations; from my tests: add, subtract, multiply and divide.
Rule "Vector vs Compare" Event On Each Player All All Actions <0, 1, 2> + Event Player.pos
errors with
Error: Line 8 <0, 1, 2> + Event Player.pos ^ Expected token of type COMPARE, but received NEWLINE
After some debugging, I identified the problematic line is Parser.py:519
self.eat('COMMA') >> node.children.append(self.expr()) self.eat('COMPARE')
the call to expr() triggers a call to compare() which in turn eats the closing > of the vector, and takes whatever is next (the "+ Event Player.pos" in the example) with it too
expr()
compare()
>
Remember #29? Remember this comment? This is similar to that.
It seems to happen algabraic operations; from my tests: add, subtract, multiply and divide.
Example
errors with
After some debugging, I identified the problematic line is Parser.py:519
the call to
expr()
triggers a call tocompare()
which in turn eats the closing>
of the vector, and takes whatever is next (the "+ Event Player.pos" in the example) with it too