Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Luauis a variant of Lua semi-recently becoming popular due to its open-sourcing and use by Roblox. It has a mix of features from 5.1-5.4 that make it not really fit into any traditional Lua version.Why
There's roblox-ts but that's another project and not everyone is using Luau for Roblox. We're using it for our own game engine - and I'm aware of other projects making use of Luau (the popular mlua rust library supports it, despite being a "lua" library)
Luaudoes include a type system, but it's not yet capable enough for my usecases. Plus, that's ignoring all the other benefits that Typescript brings.Changes
This PR:
LuauluaTargetcontinuestatement used solely by Luau.if <COND> then <X> else <Y>ternary operator used solely by Luau.There are other Luau-only features like type hints and compound assignment operators - but they could be done later on and aren't as pertinent
Please let me know how I should incorporate test cases - couldn't figure out how to do so myself, although I tested these features in a local project.