summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-09 08:09:00 +0200
committerAraq <rumpf_a@web.de>2012-07-09 08:09:00 +0200
commit121d4e0fc2d05d7fd3ee8dab3a8c1663c9e5a5c3 (patch)
treee81d1e5d44967dbd8a69918434d33c2c36d73c58 /compiler/ast.nim
parent795afb0021094d069b5f77d4b7ba6c9e5fc5d803 (diff)
downloadNim-121d4e0fc2d05d7fd3ee8dab3a8c1663c9e5a5c3.tar.gz
'addSon' for types deprecated for 'int literal type' analysis
Diffstat (limited to 'compiler/ast.nim')
-rwxr-xr-xcompiler/ast.nim15
1 files changed, 9 insertions, 6 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index e3528dece..9cd741cf1 100755
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -718,7 +718,6 @@ proc lastSon*(n: PType): PType {.inline.}
 proc newSons*(father: PNode, length: int)
 proc newSons*(father: PType, length: int)
 proc addSon*(father, son: PNode)
-proc addSon*(father, son: PType)
 proc delSon*(father: PNode, idx: int)
 proc hasSonWith*(n: PNode, kind: TNodeKind): bool
 proc hasSubnodeWith*(n: PNode, kind: TNodeKind): bool
@@ -996,11 +995,6 @@ proc newSons(father: PType, length: int) =
   else:
     setlen(father.sons, length)
 
-proc addSon(father, son: PType) = 
-  if isNil(father.sons): father.sons = @[]
-  add(father.sons, son)
-  #assert((father.kind != tyGenericInvokation) or (son.kind != tyGenericInst))
-
 proc sonsLen(n: PNode): int = 
   if isNil(n.sons): result = 0
   else: result = len(n.sons)
@@ -1011,6 +1005,15 @@ proc newSons(father: PNode, length: int) =
   else:
     setlen(father.sons, length)
 
+proc addSon*(father, son: PType) {.deprecated.} =
+  if isNil(father.sons): father.sons = @[]
+  add(father.sons, son)
+  #assert((father.kind != tyGenericInvokation) or (son.kind != tyGenericInst))
+
+proc rawAddSon*(father, son: PType) =
+  if isNil(father.sons): father.sons = @[]
+  add(father.sons, son)
+
 proc addSon(father, son: PNode) = 
   assert son != nil
   if isNil(father.sons): father.sons = @[]