Skip to content

Commit 13a9cf1

Browse files
committed
Updating match statement
1 parent ac2d08c commit 13a9cf1

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

core/src/tokenizer.rs

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -660,36 +660,19 @@ define_handlers! {
660660
tok.bump();
661661

662662
match tok.peek_byte() {
663-
b'b' => {
663+
b'b' | b'B' => {
664664
tok.bump();
665665

666666
return Ok(Literal(tok.read_binary()));
667667
},
668-
b'B' => {
669-
tok.bump();
670-
671-
return Ok(Literal(tok.read_binary()));
672-
},
673-
674-
b'o' => {
675-
tok.bump();
676-
677-
return Ok(Literal(tok.read_octal()));
678-
},
679668

680-
b'O' => {
669+
b'o' | b'O' => {
681670
tok.bump();
682671

683672
return Ok(Literal(tok.read_octal()));
684673
},
685674

686-
b'x' => {
687-
tok.bump();
688-
689-
return Ok(Literal(tok.read_hexadec()));
690-
},
691-
692-
b'X' => {
675+
b'x' | b'X' => {
693676
tok.bump();
694677

695678
return Ok(Literal(tok.read_hexadec()));

0 commit comments

Comments
 (0)