Open DoctorRyner opened 4 years ago
Also when I used http://siffiejoe.github.io/lua-amalg/ to bundle it in a single file it throws this error:
=> main λ (~/tmp/purescript/ps-to-lua-test/ceres) = ceres build -- --map WorldEditTestMap.w3x
> Received build command
> Input: WorldEditTestMap.w3x
> Retain map script: true
> Output type: mpq
> Loaded map WorldEditTestMap.w3x
> WARN: Could not extract script from map WorldEditTestMap.w3x: File not found
> WARN: Map script won't be included in the final artifact
> Building without including original map script
> ERR: Map build failed:
> Could not compile module [main] ("src/main.lua"):
Could not parse file:
--> 3366:11
|
3366 | local local_UTC_offset_sec = difftime(time(date("!*t", now)), time(date("*t", now)))␊
| ^---
|
= expected Ident
I'm not really sure whether pure Lua even supports cyclic dependencies (maybe when the module doesn't return any result it is ok?), but in general there is no nice way of solving circular dependencies in a language like Lua.
The second issue seems to be down to a parser error. I'll look into fixing it.
Well, Lua's interpreter is able to run my code from CLI
If that's the case, then I might lift the restriction on cyclic dependencies. I'll look into it.
build.zip
Hi. When I put this to src and rename Main.lua to main.lua I get:
But when I use original Lua interpreter, it works fine
Is it possible to make it work?
I use http://www.purescript.org as a scripting language
It compiles to JavaScript and then I use https://github.com/PaulBernier/castl to compile it from JavaScript to Lua. castl/ directory comes from lua/castl in the previously mentioned repository and it contains runtime for JavaScript