boolangery / py-lua-parser

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

AST deserialization (to_lua_source) issue with assign's that have no values #37

Closed SpiritXmas closed 1 year ago

SpiritXmas commented 1 year ago

local a;

When parsed and then turned back into source it is left like this

local a =

Temporary fix would be assigning all assigns that have no values a nil node.

SpiritXmas commented 1 year ago

Also another slight issue within the printer is how semi colons are represented. They're each on a new line away from the actual end of line where it should be. Example below


local a = 3
;
local b = 6
;