Kampfkarren / full-moon

A lossless Lua 5.1 parser
Mozilla Public License 2.0
394 stars 52 forks source link

Incorrect unary precedence #296

Closed toxamin closed 5 months ago

toxamin commented 8 months ago

The rewritten parser incorrectly treats unary precedence, thus parsing the following: local c = -a + b

incorrectly gives: UnaryOperator(BinaryOperator(a, b)) instead of the expected BinaryOperator(UnaryOperator(a), b)