mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
hotfix: make tcompilerapi green again
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user