implemented a[^1] notation

This commit is contained in:
Araq 2015-03-26 02:12:26 +01:00
commit 5d63ecb3a4
13 changed files with 209 additions and 50 deletions

View file

@ -590,7 +590,7 @@ proc firstOrd(t: PType): BiggestInt =
of tyUInt..tyUInt64: result = 0
of tyEnum:
# if basetype <> nil then return firstOrd of basetype
if (sonsLen(t) > 0) and (t.sons[0] != nil):
if sonsLen(t) > 0 and t.sons[0] != nil:
result = firstOrd(t.sons[0])
else:
assert(t.n.sons[0].kind == nkSym)