Skip to content

Commit cf7668e

Browse files
committed
0.8.1 fixed tests
1 parent 5cd3401 commit cf7668e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ macro_rules! sequence {
3333
macro_rules! read_num {
3434
($parser:ident, $num:ident, $then:expr) => {
3535
loop {
36-
let ch = next_byte!($parser);
36+
let ch = next_byte!($parser || break);
3737
match ch {
3838
b'0' ... b'9' => {
3939
let $num = ch - b'0';
@@ -358,13 +358,13 @@ impl<'a> Parser<'a> {
358358
},
359359
b'"' |
360360
b'\\' |
361-
b'/' => ch,
361+
b'/' => escaped,
362362
b'b' => 0x8,
363363
b'f' => 0xC,
364364
b't' => b'\t',
365365
b'r' => b'\r',
366366
b'n' => b'\n',
367-
_ => return self.unexpected_character(ch)
367+
_ => return self.unexpected_character(escaped)
368368
};
369369
buffer.push(escaped);
370370
},

0 commit comments

Comments
 (0)