diff options
author | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-09 19:37:26 +0100 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-09 19:37:26 +0100 |
commit | fe4cc78294fc3eed5335690e155a78dc119e39a8 (patch) | |
tree | 8e4a92889d39db17ec4d3eef2f899fe85bb663f8 | |
parent | 684bb09773da6876980242850cdacb0aefee7bcc (diff) | |
download | Nim-fe4cc78294fc3eed5335690e155a78dc119e39a8.tar.gz |
bugfix:hexadecimal ranges 0x00..0x01
-rwxr-xr-x | rod/scanner.nim | 2 | ||||
-rwxr-xr-x | tests/accept/compile/thexrange.nim | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/rod/scanner.nim b/rod/scanner.nim index 04a41fb5c..fb9a9fa2c 100755 --- a/rod/scanner.nim +++ b/rod/scanner.nim @@ -357,7 +357,7 @@ proc GetNumber(L: var TLexer): TToken = result.base = base16 while true: case L.buf[pos] - of 'G'..'Z', 'g'..'z', '.': + of 'G'..'Z', 'g'..'z': lexMessage(L, errInvalidNumber, result.literal) inc(pos) of '_': diff --git a/tests/accept/compile/thexrange.nim b/tests/accept/compile/thexrange.nim new file mode 100755 index 000000000..875a5bab3 --- /dev/null +++ b/tests/accept/compile/thexrange.nim @@ -0,0 +1,8 @@ + +type + TArray = array[0x0012..0x0013, int] + +var a: TArray + +echo a[0] #OUT 0 + |