oxc/crates
overlookmotel 0bdecb5043
refactor(parser): wrapper type for parser (#2339)
Split parser into public interface `Parser` and internal implementation `ParserImpl`.

This involves no changes to public API.

This change is a bit annoying, but justification is that it's required for #2341, which I believe to be very worthwhile.

The `ParserOptions` type also makes it a bit clearer what the defaults for `allow_return_outside_function` and `preserve_parens` are. It came as a surprise to me that `preserve_parens` defaults to `true`, and this refactor makes that a bit more obvious when reading the code.

All the real changes are in [oxc_parser/src/lib.rs](https://github.com/oxc-project/oxc/pull/2339/files#diff-8e59dfd35fc50b6ac9a9ccd991e25c8b5d30826e006d565a2e01f3d15dc5f7cb). The rest of the diff is basically replacing `Parser` with `ParserImpl` everywhere else.
2024-02-07 23:22:08 +08:00
..
oxc Publish crates v0.6.0 2024-02-03 22:35:30 +08:00
oxc_allocator Publish crates v0.6.0 2024-02-03 22:35:30 +08:00
oxc_ast feat(ast): enter AstKind::ExportDefaultDeclaration, AstKind::ExportNamedDeclaration and AstKind::ExportAllDeclaration (#2317) 2024-02-05 17:43:30 +08:00
oxc_cli feat(cli): add --version (#2182) 2024-01-26 19:13:17 +08:00
oxc_codegen feat(codegen): avoid printing comma in ArrayAssignmentTarget if the elements is empty (#2331) 2024-02-06 22:45:19 +08:00
oxc_diagnostics Publish crates v0.6.0 2024-02-03 22:35:30 +08:00
oxc_index Publish crates v0.6.0 2024-02-03 22:35:30 +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(semantic): add export binding for ExportDefaultDeclarations in module record (#2329) 2024-02-06 22:01:16 +08:00
oxc_macros feat(linter): remove the --timings feature (#2049) 2024-01-16 14:21:04 +08:00
oxc_minifier refactor(ast): fix BigInt memory leak by removing it (#2293) 2024-02-04 16:47:00 +08:00
oxc_parser refactor(parser): wrapper type for parser (#2339) 2024-02-07 23:22:08 +08:00
oxc_prettier feat(prettier): Support TSImportEqualsDeclaration (#2321) 2024-02-05 20:37:26 +08:00
oxc_semantic feat(semantic): add export binding for ExportDefaultDeclarations in module record (#2329) 2024-02-06 22:01:16 +08:00
oxc_span feat(span): fix memory leak by implementing inlineable string for oxc_allocator (#2294) 2024-02-04 19:28:23 +08:00
oxc_syntax fix(semantic): remove unnecessary SymbolFlags::Import (#2311) 2024-02-05 14:16:29 +08:00
oxc_transformer Publish crates v0.6.0 2024-02-03 22:35:30 +08:00
oxc_wasm chore(wasm): remove console_error_panic_hook 2024-02-02 17:02:01 +08:00