boolangery / py-lua-parser

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

Failure to parse chained comparisons #56

Open bendrissou opened 5 months ago

bendrissou commented 5 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.