wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps
https://wurstlang.org
Apache License 2.0
226 stars 28 forks source link

Remove empty lines between globals in lua #999

Closed Jampi0n closed 3 years ago

Jampi0n commented 3 years ago

The lua printer adds two line breaks after every part of the program. This makes sense for functions, but causes every second line to be empty for globals.

Before:

function f()
    ...
end

x = nil

y = nil

z = nil

function g()
    ...
end

A.a = nil

B.b = nil

After:

function f()
    ...
end

x = nil
y = nil
z = nil

function g()
    ...
end

A.a = nil
B.b = nil
Frotty commented 3 years ago

👍