Added system.staticExec proc for executing external command at compile-time

This commit is contained in:
Zahary Karadjov 2012-06-02 19:51:49 +03:00
commit a1da1f987b
13 changed files with 83 additions and 39 deletions

View file

@ -1436,6 +1436,8 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
of mArrToSeq: genArrToSeq(p, e, d)
of mNLen..mNError:
localError(e.info, errCannotGenerateCodeForX, e.sons[0].sym.name.s)
of mSlurp, mStaticExec:
localError(e.info, errXMustBeCompileTime, e.sons[0].sym.name.s)
else: internalError(e.info, "genMagicExpr: " & $op)
proc genConstExpr(p: BProc, n: PNode): PRope