-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unexpected Token Error When Creating AST with Lua Code Containing the "//" Operator #129
Comments
We currently only support Lua 5.1/Luau mode but the underlying parser we use (full_moon) does support Lua 5.2, 5.3, and 5.4. We would need to add a flag/config option to Moonwave to allow selecting which version of Lua to use to support this. |
Hey, 👋🏻 I'm currently affected by this, I was wondering when will the update be released? |
Hello @RuizuKun-Dev, I gave a brief answer on Discord but I will also provide an answer here in case anyone else comes across this. This issue would be fixed by updating full-moon to v0.19.0, which is the version I was originally going to update Moonwave to. Unfortunately, I was experiencing full-moon crashes on that version in large codebases during testing, such as Nevermore. These crashes are fixed in full-moon v1.0.0 which is not out just yet. Since I do not want to break workflows for projects such as Nevermore, this is currently blocked until the release of full-moon v1.0.0 which, to my knowledge, has no ETA but is currently in pre-release phase and should hopefully be released soon. In the meantime, you can instead do -- This
math.floor(a / b)
-- Instead of
a // b For future tracking, see #147. |
ahhh, okay thank you for the answer appreciate it! 🙏🏻 @YetAnotherClown
yeah, I actually did that for bufferUtil thanks, i sub to the issue and repo release |
the error msg is:
It is worth noting that the "//" operator was only introduced to Lua in version 5.3. In order to reproduce this error, you can use the following code snippet:
Please note that this error appears to be related to the parser, as it is unable to recognize the "//" operator.
The text was updated successfully, but these errors were encountered: