oxc/crates
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
..
oxc feat(ast): TypeScript definition for wasm target (#2158) 2024-01-30 15:43:03 +08:00
oxc_allocator docs(allocator): document behaviour of Box 2024-01-29 21:34:45 +08:00
oxc_ast refactor(semantic): adding binder for ImportSpecifier replaces the ModuleDeclaration's binder (#2230) 2024-01-31 11:57:08 +08:00
oxc_cli feat(cli): add --version (#2182) 2024-01-26 19:13:17 +08:00
oxc_codegen feat(codegen): change back to read raw (#2222) 2024-01-31 12:17:52 +08:00
oxc_diagnostics Better source line and column numbers (#2213) 2024-01-30 12:26:16 +08:00
oxc_index Publish crates v0.5.0 2024-01-12 23:33:47 +08:00
oxc_js_regex Initialize JS Regex crates and def AST. (#1500) 2023-11-23 00:22:17 +08:00
oxc_language_server chore(deps): update cargo (#2191) 2024-01-29 11:38:47 +08:00
oxc_linter feat(linter): implement @next/next/no-before-interactive-script-outsi… (#2203) 2024-01-29 21:01:50 +08:00
oxc_macros feat(linter): remove the --timings feature (#2049) 2024-01-16 14:21:04 +08:00
oxc_minifier feat(codegen): move string test to codegen (#2150) 2024-01-23 23:49:36 +08:00
oxc_parser refactor(lexer): don't use lexer.current.chars directly (#2237) 2024-01-31 21:35:46 +08:00
oxc_prettier fix(codegen): print Directive original string (#2157) 2024-01-25 15:24:05 +08:00
oxc_semantic refactor(semantic): adding binder for ImportSpecifier replaces the ModuleDeclaration's binder (#2230) 2024-01-31 11:57:08 +08:00
oxc_span feat(ast): TypeScript definition for wasm target (#2158) 2024-01-30 15:43:03 +08:00
oxc_syntax feat(ast): remove serde skip for symbol_id and reference_id (#2220) 2024-01-30 21:03:05 +08:00
oxc_transformer feat(transformer/decorators): support static member (#2235) 2024-01-31 19:11:27 +08:00
oxc_wasm feat(ast): remove serde skip for symbol_id and reference_id (#2220) 2024-01-30 21:03:05 +08:00