diff options
author | Araq <rumpf_a@web.de> | 2017-01-07 02:38:26 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-01-07 02:38:26 +0100 |
commit | 9d488261dfafd90870f46e5b361dc55df301ff16 (patch) | |
tree | 357d620e297885f95f7edbb5aa189cf5a87e0aea /compiler/vmops.nim | |
parent | a17d996be9a7dd9086a1a4707486dd6b213ed632 (diff) | |
download | Nim-9d488261dfafd90870f46e5b361dc55df301ff16.tar.gz |
added system.gorgeEx that includes the exitCode; refs #4874; fixes #1994
Diffstat (limited to 'compiler/vmops.nim')
-rw-r--r-- | compiler/vmops.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/vmops.nim b/compiler/vmops.nim index 1c2725a98..b0911579e 100644 --- a/compiler/vmops.nim +++ b/compiler/vmops.nim @@ -59,6 +59,11 @@ proc staticWalkDirImpl(path: string, relative: bool): PNode = result.add newTree(nkPar, newIntNode(nkIntLit, k.ord), newStrNode(nkStrLit, f)) +proc gorgeExWrapper(a: VmArgs) {.nimcall.} = + let (s, e) = opGorge(getString(a, 0), getString(a, 1), getString(a, 2), + a.currentLineInfo) + setResult a, newTree(nkPar, newStrNode(nkStrLit, s), newIntNode(nkIntLit, e)) + proc registerAdditionalOps*(c: PCtx) = wrap1f_math(sqrt) wrap1f_math(ln) @@ -92,3 +97,4 @@ proc registerAdditionalOps*(c: PCtx) = systemop getCurrentExceptionMsg registerCallback c, "stdlib.*.staticWalkDir", proc (a: VmArgs) {.nimcall.} = setResult(a, staticWalkDirImpl(getString(a, 0), getBool(a, 1))) + systemop gorgeEx |