Lua 5.4 support
See original GitHub issueThis issue tracks all changes required to support parsing Lua 5.4 code.
While PUC-Rio hasn’t officially released Lua 5.4 yet, it already appears it is going to bring at least one syntactic innovation: attributes in local declarations, to implement immutable bindings and ‘to-be-closed variables’, i.e. a form of lexical cleanup/with
statement/RAII. The EBNF is as follows:
stat ::= local ‘<’ Name ‘>’ Name ‘=’ exp
I assume this particular syntax will change, as the current one does not permit declaring multiple attributes simultaneously, and there is no syntax for combining attributes with the local function
construct.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Lua 5.4 Reference Manual
Lua supports coroutines on all systems, even those that do not support threads natively. The type table implements associative arrays, ...
Read more >Lua 5.4 readme - Lua.org
Open a terminal window and move to the top-level directory, which is named lua-5.4. · Do " make ". · If the guess...
Read more >Lua: version history
The current release is Lua 5.4.4, released on 26 Jan 2022. ... bitwise operators, a basic utf-8 library, and support for both 64-bit...
Read more >Lua 5.4 Reference Manual - contents
Lua 5.4 Reference Manual. The reference manual is the official definition of the Lua language. For a complete introduction to Lua programming, ...
Read more >Lua: download
All versions are available for download. The current version is Lua 5.4 and its current release is Lua 5.4.4. download, lua-5.4.4.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@TwoLivesLeft No need for that, probably. I have the code already written in my private branch, all that remains is to write the tests.
I have added support for Lua 5.4 local attributes in my fork, though I don’t feel confident making a pull request (haven’t run tests, nor am I certain my implementation is the best way to handle this). The commit is here in case it is of any interest
https://github.com/TwoLivesLeft/luaparse/commit/1e88e5d2c04c83c5bc4a967c6002cc2f38a396e1