more modules compile again
This commit is contained in:
parent
fedc136985
commit
05724645f8
12 changed files with 260 additions and 236 deletions
|
|
@ -15,8 +15,6 @@ from math import sqrt, ln, log10, log2, exp, round, arccos, arcsin,
|
|||
|
||||
from os import getEnv, existsEnv, dirExists, fileExists, putEnv, walkDir
|
||||
|
||||
from options import gProjectPath
|
||||
|
||||
template mathop(op) {.dirty.} =
|
||||
registerCallback(c, "stdlib.math." & astToStr(op), `op Wrapper`)
|
||||
|
||||
|
|
@ -77,15 +75,15 @@ proc staticWalkDirImpl(path: string, relative: bool): PNode =
|
|||
result.add newTree(nkTupleConstr, 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(nkTupleConstr, newStrNode(nkStrLit, s), newIntNode(nkIntLit, e))
|
||||
|
||||
proc getProjectPathWrapper(a: VmArgs) {.nimcall.} =
|
||||
setResult a, gProjectPath
|
||||
|
||||
proc registerAdditionalOps*(c: PCtx) =
|
||||
proc gorgeExWrapper(a: VmArgs) =
|
||||
let (s, e) = opGorge(getString(a, 0), getString(a, 1), getString(a, 2),
|
||||
a.currentLineInfo, c.config)
|
||||
setResult a, newTree(nkTupleConstr, newStrNode(nkStrLit, s), newIntNode(nkIntLit, e))
|
||||
|
||||
proc getProjectPathWrapper(a: VmArgs) =
|
||||
setResult a, c.config.projectPath
|
||||
|
||||
wrap1f_math(sqrt)
|
||||
wrap1f_math(ln)
|
||||
wrap1f_math(log10)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue