boolangery / py-lua-parser

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

Parsing removes parentheses #35

Closed IAMSPYS closed 1 year ago

IAMSPYS commented 1 year ago

Parsing Lua code seems to remove parentheses from the AST tree, causing problem when the code is rendered. For example: Parsing (1+5)/2 results in 1+5/2 (Causing unexpected math result) Parsing (function() return "AnonymousFunction" end)() results in function() "AnonymousFunction" end() (Causing error in rendered Lua code as Anonymous Functions require closed parentheses around them)

Missing parentheses are a significant issue in math and programming and should be fixed as soon as possible, Thank you.

fabi321 commented 1 year ago

This looks to be a duplicate of #34, can you close this issue in favor of the older one?