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

Support for labels in Lua script #172

Open
mylesdunlop opened this issue Nov 17, 2023 · 2 comments
Open

Support for labels in Lua script #172

mylesdunlop opened this issue Nov 17, 2023 · 2 comments

Comments

@mylesdunlop
Copy link

Possibly this shortcoming arises from eLua being forked off Lua before support for labels was added?
I'm thinking of script like:

::mylabel::
...
goto mylabel

Yes it's not great coding practice, but can still be a useful technique when auto-generating Lua script to deliver some higher level application functionality.

@mylesdunlop
Copy link
Author

mylesdunlop commented Nov 17, 2023

In llex.h/c, noting that TK_DBCOLON is not in eLua. It looks reasonably straightforward to add it in to the parser, but is there an plan to merge the latest language features that would make this piecemeal action unnecessary?
EDIT - Not so straightforward it seems...

@bogdanm
Copy link
Member

bogdanm commented Nov 21, 2023

Hi,

Lua's goto was added in version 5.2. Adding support for it is a bit more involved than just modifying the parser, as you already pointed out. eLua is based on Lua 5.1 and there are currently no plans to use another version of Lua.

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

No branches or pull requests

2 participants