diff options
author | Matthew Baulch <baulch.matt@gmail.com> | 2016-08-27 19:38:23 +1000 |
---|---|---|
committer | Matthew Baulch <baulch.matt@gmail.com> | 2016-08-27 19:38:23 +1000 |
commit | 5e0a062a9094c447cf9d102de92f1154eb6bc755 (patch) | |
tree | ad9c41d1a8929b05feea88ab1724a5d448222569 | |
parent | 701109e8c193db12a4fd320b214badfa08383fdd (diff) | |
download | Nim-5e0a062a9094c447cf9d102de92f1154eb6bc755.tar.gz |
Remove (unused) flattenTree proc.
-rw-r--r-- | compiler/trees.nim | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/compiler/trees.nim b/compiler/trees.nim index 15e0259d6..832b206d9 100644 --- a/compiler/trees.nim +++ b/compiler/trees.nim @@ -121,20 +121,6 @@ proc isDeepConstExpr*(n: PNode): bool = result = true else: discard -proc flattenTreeAux(d, a: PNode, op: TMagic) = - if (getMagic(a) == op): # a is a "leaf", so add it: - for i in countup(1, sonsLen(a) - 1): # BUGFIX - flattenTreeAux(d, a.sons[i], op) - else: - addSon(d, copyTree(a)) - -proc flattenTree*(root: PNode, op: TMagic): PNode = - result = copyNode(root) - if getMagic(root) == op: - # BUGFIX: forget to copy prc - addSon(result, copyNode(root.sons[0])) - flattenTreeAux(result, root, op) - proc isRange*(n: PNode): bool {.inline.} = if n.kind in nkCallKinds: if n[0].kind == nkIdent and n[0].ident.id == ord(wDotDot) or |