question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This 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:open
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fstirlitzcommented, May 10, 2021

@TwoLivesLeft No need for that, probably. I have the code already written in my private branch, all that remains is to write the tests.

0reactions
TwoLivesLeftcommented, Jan 21, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found