Call ambiguity syntax is handled oddly
Due to Lua not recognizing line breaks as statement delimiters, there is an infamous ambiguity of the Lua syntax. If a blank line is left in an indented block as follows, preceded by a parenthesized call statement:
do
_ = a
(b or c)()
end
StyLua will first turn this into:
do
_ = a
(b or c)()
end
And only after this into the expected form (which highlights how Lua actually treats the newline):
do
_ = a(b or c)()
end
This is somewhat related to #169, and it is quite hard to solve with the current way StyLua works. Fixing this and #169 will require a large overhaul of formatting at the token level, which is why its taken me a while to do this.
At the moment, the 2-pass formatting isn't a particular concern for me (it might actually help someone notice the ambiguity in this situation), but I will try to fix this bug one day