Support for labels in Lua script
Opened this issue · 2 comments
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.
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...
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.