diff --git a/trunk_lexer/src/lexer.rs b/trunk_lexer/src/lexer.rs index 28c3b4a..4df7f78 100644 --- a/trunk_lexer/src/lexer.rs +++ b/trunk_lexer/src/lexer.rs @@ -930,15 +930,15 @@ impl Lexer { let mut buffer = String::new(); let (base, kind) = match self.peek_buf() { - [b'0', b'b', ..] => { + [b'0', b'B' | b'b', ..] => { self.skip(2); (2, NumberKind::Int) } - [b'0', b'o', ..] => { + [b'0', b'O' | b'o', ..] => { self.skip(2); (8, NumberKind::Int) } - [b'0', b'x', ..] => { + [b'0', b'X' | b'x', ..] => { self.skip(2); (16, NumberKind::Int) } @@ -1658,14 +1658,17 @@ function hello_world() { #[test] fn ints() { assert_tokens( - "