oxc/crates/oxc_parser/src/ts
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
..
mod.rs refactor(parser): use function instead of trait to parse delimited lists (#4014) 2024-07-02 14:47:56 +08:00
statement.rs refactor(parser): do not use AstBuilder::*_from_* methods (#7068) 2024-11-02 01:22:55 +00:00
types.rs refactor(parser): do not use AstBuilder::*_from_* methods (#7068) 2024-11-02 01:22:55 +00:00