Open dansanderson opened 2 years ago
Alas, I do rely on this trick quite a lot in my luamin-ified code quite a lot (every token counts!) So, I would definitely be keen on this being supported.
FWIW, I thought it already did (as it seems I'm only using the string param method so far, and the minified output seems to preserve it... so far!)
@Liquidream It works fine with luamin! This bug is specific to the Lua parser. luamin operates directly on the token stream and doesn't use the parser.
blurble end do blah{x=1} blurble sspr
isn't valid Lua but luamin is happy to minify that to
a end do b{c=1} a sspr
Ah... my bad (explains why I never thought it was an issue 🤦♂️) *HidesInShame* 🙈
Lua allows parentheses to be omitted from a function call if there is exactly one argument and the argument is a string or table literal. picotool does not yet support this case. PICO-8 supports it and offers a one-token discount compared to a similar call with parentheses.
I'm not sure how important this is to support, but I'm creating an issue for it just so we can track it. Upvotes and feedback welcome.