hotfix: make tcompilerapi green again

This commit is contained in:
Araq
2020-04-30 22:47:59 +02:00
parent 89be5be03e
commit 6b39b47abc

View File

@@ -17,7 +17,8 @@ import std / [os]
proc main() =
let std = findNimStdLibCompileTime()
var intr = createInterpreter("myscript.nim",[std, parentDir(currentSourcePath)])
var intr = createInterpreter("myscript.nim", [std, parentDir(currentSourcePath),
std / "pure", std / "core"])
intr.implementRoutine("*", "exposed", "addFloats", proc (a: VmArgs) =
setResult(a, getFloat(a, 0) + getFloat(a, 1) + getFloat(a, 2))
)
@@ -46,7 +47,7 @@ block issue9180:
proc evalString(code: string, moduleName = "script.nim") =
let stream = llStreamOpen(code)
let std = findNimStdLibCompileTime()
var intr = createInterpreter(moduleName, [std])
var intr = createInterpreter(moduleName, [std, std / "pure", std / "core"])
intr.evalScript(stream)
destroyInterpreter(intr)
llStreamClose(stream)