oxc/crates/oxc_parser/src/js
overlookmotel fdd480d84c refactor(parser): do not use AstBuilder::*_from_* methods (#7068)
Preparation for #7073. Avoid using `AstBuilder::*_from_*` methods to construct enums, use explicit construction instead.

Before:

```rs
let ident = self.ast.binding_pattern_kind_from_binding_identifier(ident);
```

After:

```rs
let ident = BindingPatternKind::BindingIdentifier(ident);
```

Often this produces shorter code, as well as (in my opinion) being easier to read.
2024-11-02 01:22:55 +00:00
..
arrow.rs refactor(parser): do not use AstBuilder::*_from_* methods (#7068) 2024-11-02 01:22:55 +00:00
binding.rs refactor(parser): do not use AstBuilder::*_from_* methods (#7068) 2024-11-02 01:22:55 +00:00
class.rs refactor(parser): do not use AstBuilder::*_from_* methods (#7068) 2024-11-02 01:22:55 +00:00
declaration.rs refactor(parser): add ParserImpl::alloc method (#7063) 2024-11-01 17:09:06 +00:00
expression.rs refactor(parser): do not use AstBuilder::*_from_* methods (#7068) 2024-11-02 01:22:55 +00:00
function.rs refactor(parser): do not use AstBuilder::*_from_* methods (#7068) 2024-11-02 01:22:55 +00:00
grammar.rs refactor(parser): add ParserImpl::alloc method (#7063) 2024-11-01 17:09:06 +00:00
mod.rs refactor(parser): use function instead of trait to parse list with rest element (#4028) 2024-07-02 13:43:14 +00:00
module.rs perf(parser): precompute is_typescript (#6443) 2024-10-11 03:39:38 +00:00
object.rs refactor(parser): do not use AstBuilder::*_from_* methods (#7068) 2024-11-02 01:22:55 +00:00
operator.rs fix(parser): do not parse as and satisfies expression in javascript (#6442) 2024-10-11 03:31:24 +00:00
statement.rs refactor(parser): add ParserImpl::alloc method (#7063) 2024-11-01 17:09:06 +00:00