Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Error when requiring modules #1523

Open
ragnard-king opened this issue Dec 22, 2017 · 1 comment
Open

Error when requiring modules #1523

ragnard-king opened this issue Dec 22, 2017 · 1 comment
Assignees
Labels
blocker An issue that is blocking further progress for users

Comments

@ragnard-king
Copy link
Contributor

https://forum.defold.com/t/error-in-searching-modules/14918

@ragnard-king ragnard-king added the blocker An issue that is blocking further progress for users label Dec 22, 2017
@ragnard-king ragnard-king self-assigned this Dec 22, 2017
@ragnard-king
Copy link
Contributor Author

Turns out this is a problem with our Lua parser.

The problem occurs when you use goto as the key in a table expression:

local x = { goto="foo"}

goto is a keyword in Lua 5.2 (and a reserved name before then) so it shouldn't really be used like this, but our grammar struggles with such expressions, and luajit happily allows goto in tables, while vanilla lua doesn't.

A workaround is to replace usages of:

goto = ...

in table literals with

["goto"] = ...

We will be looking into a proper fix for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocker An issue that is blocking further progress for users
Projects
None yet
Development

No branches or pull requests

1 participant