Fixes problems with JS code gen.

--out for JS backend now works. setLen now works, this also fixes the base64
module. getCurrentExceptionMsg now also works with exceptions thrown by
JS. log() supports a variable number of args now. Fixed some case
sensitivity issues with arrayConstr and other functions.
This commit is contained in:
Dominik Picheta 2014-04-11 21:36:02 +01:00
commit b0a16fb619
3 changed files with 51 additions and 26 deletions

View file

@ -61,8 +61,12 @@ proc handleCmdLine() =
tccgen.run()
if optRun in gGlobalOptions:
if gCmd == cmdCompileToJS:
var ex = quoteShell(
completeCFilePath(changeFileExt(gProjectFull, "js").prependCurDir))
var ex: string
if options.outFile.len > 0:
ex = options.outFile.prependCurDir.quoteShell
else:
ex = quoteShell(
completeCFilePath(changeFileExt(gProjectFull, "js").prependCurDir))
execExternalProgram("node " & ex & ' ' & service.arguments)
else:
var binPath: string