Skip to content

Lua 5.0 support#1263

Merged
Perryvw merged 77 commits intoTypeScriptToLua:masterfrom
YoRyan:lua5.0
Sep 3, 2022
Merged

Lua 5.0 support#1263
Perryvw merged 77 commits intoTypeScriptToLua:masterfrom
YoRyan:lua5.0

Conversation

@YoRyan
Copy link
Contributor

@YoRyan YoRyan commented Apr 20, 2022

This PR is a first attempt at introducing support for Lua 5.0, a version that some older games remain stuck on. It adds a 5.0 LuaTarget that triggers the appropriate syntax for variadic arguments and length-checking and modulo operations.

Lua 5.0, while mostly similar to 5.1, is not forwards-compatible; it is not possible to write a transpiler that is simultaneously compatible with both 5.0 and 5.1 syntax. Hence, if you choose to accept support for 5.0, you might also need to rename the "Universal" target to something more descriptive, like "5.1+".

Next steps: Adding tests, adding the appropriate type annotations for the 5.0 standard library to the lua-types package, and updating lualib to be 5.0-compatible.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants