bugfix:hexadecimal ranges 0x00..0x01
This commit is contained in:
parent
684bb09773
commit
fe4cc78294
2 changed files with 9 additions and 1 deletions
|
|
@ -357,7 +357,7 @@ proc GetNumber(L: var TLexer): TToken =
|
||||||
result.base = base16
|
result.base = base16
|
||||||
while true:
|
while true:
|
||||||
case L.buf[pos]
|
case L.buf[pos]
|
||||||
of 'G'..'Z', 'g'..'z', '.':
|
of 'G'..'Z', 'g'..'z':
|
||||||
lexMessage(L, errInvalidNumber, result.literal)
|
lexMessage(L, errInvalidNumber, result.literal)
|
||||||
inc(pos)
|
inc(pos)
|
||||||
of '_':
|
of '_':
|
||||||
|
|
|
||||||
8
tests/accept/compile/thexrange.nim
Executable file
8
tests/accept/compile/thexrange.nim
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
type
|
||||||
|
TArray = array[0x0012..0x0013, int]
|
||||||
|
|
||||||
|
var a: TArray
|
||||||
|
|
||||||
|
echo a[0] #OUT 0
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue