boolangery / py-lua-parser

A Lua parser and AST builder written in Python.
MIT License
124 stars 39 forks source link

Failure to parse chained comparisons #56

Closed bendrissou closed 1 month ago

bendrissou commented 9 months ago

Hi,

Here is a Lua example:

if false == false == false then 
x = 2
end

When parsing this program, the parser returns the following:

error: Error: Expecting one of 'and', 'function', 'nil', 'not', 'or', 'then', 'true', '+', '-', '*', '/', '//', '%', '^', '#', '&', '|', '~', '>>', '<<', '(', '{', '...', '..', NAME, NUMBER, STRING at line 1, column 21

Note that the Lua compiler executes the program successfully.