Thank you for testing it Peter. I have updated the code and fixed all the
issues you reported. The recovery pattern in Lua parser caused an infinite
loop - the memory usage should be much more stable now. The memory usage
will still be a little bit higher, as the automatic AST building captures
even unnecessary tokens, i.e. "then", "end", etc. The parser in your link
should thus have a lower memory usage, but not by much I assume.
Also, I tested parsing all the luacheck files - it works fine now.