Added system.staticExec proc for executing external command at compile-time
This commit is contained in:
parent
337e1ecc7c
commit
a1da1f987b
13 changed files with 83 additions and 39 deletions
|
|
@ -27,7 +27,7 @@ proc semWhen(c: PContext, n: PNode, semCheck = true): PNode =
|
|||
case it.kind
|
||||
of nkElifBranch, nkElifExpr:
|
||||
checkSonsLen(it, 2)
|
||||
var e = semAndEvalConstExpr(c, it.sons[0])
|
||||
var e = semConstExpr(c, it.sons[0])
|
||||
if e.kind != nkIntLit: InternalError(n.info, "semWhen")
|
||||
if e.intVal != 0 and result == nil:
|
||||
setResult(it.sons[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue