Skip to content

Conversation

jiwonz
Copy link
Contributor

@jiwonz jiwonz commented Mar 13, 2025

Closes #262

Specify parsing Lua version for full_moon

Simply replaced full_moon::parse(code) by full_moon::parse_fallible(code, LuaVersion::luau()) in src/parser.rs.

Tests were successful.

@jeparlefrancais
Copy link
Contributor

I don't think I understand the benefits for darklua? Fullmoon already is reading Luau syntax

@jiwonz
Copy link
Contributor Author

jiwonz commented Jun 26, 2025

I don't think I understand the benefits for darklua? Fullmoon already is reading Luau syntax

Actually, There is no direct benefit to darklua, but it seems closer to a measure for the ecosystem. If you use darklua as a dependency and use something like full_moon lua53 in that project, the shared full_moon dependency will load luau and lua53 features at the same time, and if there is no separate lua version determination, full_moon will parse based on the loaded features by default, which will cause an error.

CavefulGames/dalbit#4
Because of this my project can't properly use the shared full_moon.. My project decided to explicitly specify the lua version so I did that and now I request a little help from darklua

And since darklua only parses lua, I don't think there's any downside to explicitly setting darklua's parsing code target.
If setting this explicitly has any downsides, I will close this PR.

@jeparlefrancais jeparlefrancais merged commit c09d075 into seaofvoices:main Jul 4, 2025
4 of 6 checks passed
@jiwonz jiwonz deleted the specify-parsing-lua-version branch August 7, 2025 14:16
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.

Specify LuaVersion when parsing with full_moon
2 participants