Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playdate runtime support #282

Open
Ruin0x11 opened this issue Aug 26, 2023 · 2 comments · May be fixed by #321
Open

Playdate runtime support #282

Ruin0x11 opened this issue Aug 26, 2023 · 2 comments · May be fixed by #321
Labels
enhancement New feature or request

Comments

@Ruin0x11
Copy link

Hello. For the Playdate console, a Lua 5.4 runtime is provided with some minor syntax changes:

https://sdk.play.date/inside-playdate/#playdate-sdk-lua-enhancements

I think most or all of these are already in the code but feature gated behind roblox. It would be nice to have a playdate configuration.

@JohnnyMorganz JohnnyMorganz added the enhancement New feature or request label Sep 30, 2023
@DataM0del
Copy link
Contributor

Ok, so base it off of Lua 5.4.
This is all the non-standard syntax I've found in the docs, if you see more and it isn't listed, please tell me about it, and I can update this message:
You can steal the compound assignment operator parsing (e.g. +=) from Luau.
https://sdk.play.date/2.5.0/Inside%20Playdate.html#_assign_frequently_used_objects_to_local_variables It seems like they have a declaration, steal the Luau type handling and modify it a bit to remove the required colon + require brackets around "const" (if that's the only < bracket declaration)?
https://sdk.play.date/2.5.0/Inside%20Playdate.html#_assign_frequently_used_objects_to_local_variables, https://sdk.play.date/2.5.0/Inside%20Playdate.html#_structuring_your_project
Oh, imports too... Check for import statement, then parse the string.

@DataM0del
Copy link
Contributor

Support seems simple on the surface, although I don't have a playdate, but it shouldn't matter (if the compiler is OSS, can we see the modifications and deviations from Lua 5.4?).
I think I'll be able to do it.

@DataM0del DataM0del linked a pull request Oct 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants