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

goto breaks the lua2js file #51

Open
KinuTheDragon opened this issue Feb 13, 2023 · 0 comments
Open

goto breaks the lua2js file #51

KinuTheDragon opened this issue Feb 13, 2023 · 0 comments

Comments

@KinuTheDragon
Copy link

When using a goto in my Lua code, the lua2js tool dies with the following error message:

    throw new Error(str);
    ^

Error: Parse error on line 4778:
... == 0 then               goto stop           end       if id
----------------------^
Expecting '(', ':', '.', 'STRING', '{', '[', got 'NAME'
    at Parser.parseError (/home/runner/Monomod/luajs/lua2js:606:11)
    at Parser.parse (/home/runner/Monomod/luajs/lua2js:658:22)
    at Object.<anonymous> (/home/runner/Monomod/luajs/lua2js:1093:21)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47

I'll see if I can fix this by changing my Lua code to not use goto. (I didn't write the code; I'm just modifying it.)

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

1 participant