diff options
Diffstat (limited to 'compiler/nimeval.nim')
-rw-r--r-- | compiler/nimeval.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/nimeval.nim b/compiler/nimeval.nim index 841c38a46..1d7157cdf 100644 --- a/compiler/nimeval.nim +++ b/compiler/nimeval.nim @@ -89,6 +89,13 @@ proc findNimStdLib*(): string = except OSError, ValueError: return "" +proc findNimStdLibCompileTime*(): string = + ## Same as ``findNimStdLib`` but uses source files used at compile time, + ## and asserts on error. + const sourcePath = currentSourcePath() + result = sourcePath.parentDir.parentDir / "lib" + doAssert fileExists(result / "system.nim"), "result:" & result + proc createInterpreter*(scriptName: string; searchPaths: openArray[string]; flags: TSandboxFlags = {}): Interpreter = |