Allow generated code to run on Lua 5.1
Add initial support for emitting type annotations in generated code