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. |
||
|---|---|---|
| .. | ||
| oxc | ||
| oxc_allocator | ||
| oxc_ast | ||
| oxc_cli | ||
| oxc_codegen | ||
| oxc_diagnostics | ||
| oxc_index | ||
| oxc_js_regex | ||
| oxc_language_server | ||
| oxc_linter | ||
| oxc_macros | ||
| oxc_minifier | ||
| oxc_parser | ||
| oxc_prettier | ||
| oxc_semantic | ||
| oxc_span | ||
| oxc_syntax | ||
| oxc_transformer | ||
| oxc_wasm | ||