Emit Lua method code