'addSon' for types deprecated for 'int literal type' analysis
This commit is contained in:
parent
795afb0021
commit
121d4e0fc2
13 changed files with 49 additions and 33 deletions
|
|
@ -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 = @[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue