mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 12:51:57 +00:00
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. |
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| Cargo.toml | ||