You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I extracted the tar on my raspberry pi (uname is Linux raspberrypi 4.9.35-v7+) and installed luarocks to install lfs.
I copied crunch.lua from ./bin to ./lib so that it could find parser.main.
I made a simple test script which consisted of a table declaration, a loop populating it with random values, and then a second loop printing it.
I then ran lua crunch.lua test.lua. The resulting test.cr.lua file had a size of zero.
However, crunch still works in game.
I just realized that, due to this folder structure, it's not including anything in crunch. I have altered the filesystem list to include the working directory (added a true to the lib.list in loadModules() in crunch.lua). I now get an error, instead:
test.lua:eof: ./parser/main.lua:1160: attempt to index local 'toke' (a nil value).
The text was updated successfully, but these errors were encountered:
I suspect this is because I was using Lua 5.1. I switched to 5.2 (and blew away the LFS stuff, replacing it with a hardcoded list of libs because I was having a hard time with luarocks) and it works.
Interesting... Is it really "toke" or is it "token"?
I'm quite surprised because I don't see any way the function readToken is able to get a nil argument.
Would you mind giving me the output of the --debug option? That should include a traceback.
(I'm a bit short on time this evening to switch my OS and create a Lua 5.1 test.)
PS: Nice to see somebody using it outside OpenComputers. :)
I extracted the tar on my raspberry pi (uname is Linux raspberrypi 4.9.35-v7+) and installed luarocks to install lfs.
I copied crunch.lua from ./bin to ./lib so that it could find parser.main.
I made a simple test script which consisted of a table declaration, a loop populating it with random values, and then a second loop printing it.
I then ran lua crunch.lua test.lua. The resulting test.cr.lua file had a size of zero.
However, crunch still works in game.
I just realized that, due to this folder structure, it's not including anything in crunch. I have altered the filesystem list to include the working directory (added a true to the lib.list in loadModules() in crunch.lua). I now get an error, instead:
test.lua:eof: ./parser/main.lua:1160: attempt to index local 'toke' (a nil value).
The text was updated successfully, but these errors were encountered: