diff options
author | Araq <rumpf_a@web.de> | 2012-07-09 08:09:00 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-07-09 08:09:00 +0200 |
commit | 121d4e0fc2d05d7fd3ee8dab3a8c1663c9e5a5c3 (patch) | |
tree | e81d1e5d44967dbd8a69918434d33c2c36d73c58 /compiler/ast.nim | |
parent | 795afb0021094d069b5f77d4b7ba6c9e5fc5d803 (diff) | |
download | Nim-121d4e0fc2d05d7fd3ee8dab3a8c1663c9e5a5c3.tar.gz |
'addSon' for types deprecated for 'int literal type' analysis
Diffstat (limited to 'compiler/ast.nim')
-rwxr-xr-x | compiler/ast.nim | 15 |
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 = @[] |