tables work in 'const' sections; echo supports 'nil' strings; minor cleanups
This commit is contained in:
parent
9431b734b4
commit
ecd0dea091
11 changed files with 69 additions and 52 deletions
|
|
@ -28,8 +28,9 @@ proc hashTree(n: PNode): THash =
|
|||
of nkFloatLit..nkFloat64Lit:
|
||||
if (n.floatVal >= - 1000000.0) and (n.floatVal <= 1000000.0):
|
||||
result = result !& toInt(n.floatVal)
|
||||
of nkStrLit..nkTripleStrLit:
|
||||
result = result !& hash(n.strVal)
|
||||
of nkStrLit..nkTripleStrLit:
|
||||
if not n.strVal.isNil:
|
||||
result = result !& hash(n.strVal)
|
||||
else:
|
||||
for i in countup(0, sonsLen(n) - 1):
|
||||
result = result !& hashTree(n.sons[i])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue