fix parsing of hex literal 0xb
parent
73c814e5c0
commit
d5d6c93da4
|
@ -947,12 +947,15 @@ void tokenize(Buf *buf, Tokenization *out) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'b':
|
case 'b':
|
||||||
t.cur_tok->radix = 2;
|
t.cur_tok->radix = 2;
|
||||||
|
t.state = TokenizeStateNumber;
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
t.cur_tok->radix = 8;
|
t.cur_tok->radix = 8;
|
||||||
|
t.state = TokenizeStateNumber;
|
||||||
break;
|
break;
|
||||||
case 'x':
|
case 'x':
|
||||||
t.cur_tok->radix = 16;
|
t.cur_tok->radix = 16;
|
||||||
|
t.state = TokenizeStateNumber;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// reinterpret as normal number
|
// reinterpret as normal number
|
||||||
|
|
Loading…
Reference in New Issue