boolangery / py-lua-parser

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

Brackets are absent in output of AST->source_code conversion #57

Closed Real-Gecko closed 1 month ago

Real-Gecko commented 7 months ago

Code:

from luaparser import ast

source = """
result = (a + b) / (c + d)
"""

tree = ast.parse(source)
print(ast.to_lua_source(tree))

Output:

result = a + b / c + d
boolangery commented 1 month ago

Seems ok on master

Real-Gecko commented 1 month ago

Great, thanks