Closed mathiasbynens closed 11 years ago
I thought I'd do some marketing: I recently wrote a Lua parser in JavaScript which should be a good starting point for this. It still needs some polishing and feature additions to be production ready. Hopefully I'll get the time to do it soon.
Awesome! I had been looking for one but somehow failed to find yours. I’ll definitely check it out; thanks for posting!
I’ve already got a working minifier with operator precedence support (which LuaMinify lacks): http://mths.be/luamin Next up: shortening names of local variables.
Closing this issue.
P.S. luaparse is awesome. Thanks, @oxyc!
Like https://github.com/stravant/LuaMinify, but in JavaScript or PHP, so I can more easily optimize the eff out of it, and with unit tests.
Another way to put it: like https://github.com/ariya/esprima, but for Lua instead of JavaScript. ;)
Ok, about the JavaScript version — turns out @oxyc already wrote a very good Lua parser with unit tests, code coverage tests, benchmarks… Should be easy enough to build a minifier on top of that.