oxc/crates/oxc_parser
overlookmotel 622a2c37fa
refactor(lexer): don't use lexer.current.chars directly (#2237)
This PR replaces most usages of `lexer.current.chars.next()` with
`lexer.consume_char()`, or a new function `lexer.next_char()`.

This is a preparatory step towards replacing the `Chars` iterator with
something more flexible which can also consume bytes (not `char`s), and
this PR was intended as pure refactor. But surprised to see there is a
small performance bump (no idea why!).

There's an additional benefit: Using `consume_char()` everywhere where
we believe there's definitely a char there to be consumed will make
logic errors produce a panic, rather than silently outputting garbage.
2024-01-31 21:35:46 +08:00
..
examples chore(clippy): enable undocumented_unsafe_blocks 2023-10-16 15:18:14 +08:00
src refactor(lexer): don't use lexer.current.chars directly (#2237) 2024-01-31 21:35:46 +08:00
Cargo.toml chore(deps): update cargo (#2138) 2024-01-23 14:48:04 +08:00