diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-07-30 16:28:58 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-07-30 16:34:42 +0200 |
commit | 39ebe2175bd4e8e62d03875d06b24feafd36f8f7 (patch) | |
tree | e27cc59112675e052c70c6063f6bcca8e29e103c /compiler/guards.nim | |
parent | 8876ed23f1dc6d12a8ae7bf061b7e31c3adf54b4 (diff) | |
download | Nim-39ebe2175bd4e8e62d03875d06b24feafd36f8f7.tar.gz |
compiler almost free of deprecated expr/stmt names
Diffstat (limited to 'compiler/guards.nim')
-rw-r--r-- | compiler/guards.nim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/guards.nim b/compiler/guards.nim index 5ad932e48..4e887d3e3 100644 --- a/compiler/guards.nim +++ b/compiler/guards.nim @@ -728,12 +728,12 @@ proc simpleSlice*(a, b: PNode): BiggestInt = result = -1 -template isMul(x): expr = x.getMagic in someMul -template isDiv(x): expr = x.getMagic in someDiv -template isAdd(x): expr = x.getMagic in someAdd -template isSub(x): expr = x.getMagic in someSub -template isVal(x): expr = x.kind in {nkCharLit..nkUInt64Lit} -template isIntVal(x, y): expr = x.intVal == y +template isMul(x): untyped = x.getMagic in someMul +template isDiv(x): untyped = x.getMagic in someDiv +template isAdd(x): untyped = x.getMagic in someAdd +template isSub(x): untyped = x.getMagic in someSub +template isVal(x): untyped = x.kind in {nkCharLit..nkUInt64Lit} +template isIntVal(x, y): untyped = x.intVal == y import macros @@ -776,8 +776,8 @@ proc isMinusOne(n: PNode): bool = proc pleViaModel(model: TModel; aa, bb: PNode): TImplication proc ple(m: TModel; a, b: PNode): TImplication = - template `<=?`(a,b): expr = ple(m,a,b) == impYes - template `>=?`(a,b): expr = ple(m, nkIntLit.newIntNode(b), a) == impYes + template `<=?`(a,b): untyped = ple(m,a,b) == impYes + template `>=?`(a,b): untyped = ple(m, nkIntLit.newIntNode(b), a) == impYes # 0 <= 3 if a.isValue and b.isValue: |