blob: 618ecadd6144f4cb104c2e8fc414560174bdc23f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#
#
# The Nimrod Compiler
# (c) Copyright 2012 Andreas Rumpf
#
# See the file "copying.txt", included in this
# distribution, for details about the copyright.
#
# Implements a table from trees to trees. Does structural equivalence checking.
import
hashes, ast, astalgo, types
proc hashTree(n: PNode): THash =
if n == nil: return
result = ord(n.kind)
case n.kind
of nkEmpty, nkNilLit, nkType:
nil
of nkIdent:
resu
|