Pure refactor. `expr_2021` fragment specifier was I assume introduced in these macros by a codemod when we updated to Rust 2024 edition. None of these macros are used with input where there's any difference between `expr_2021` and `expr`, so just use `expr`.
Large refactor of `oxc_ast_tools`. This barely alters the generated code
which `oxc_ast_tools` produces, but it overhauls its internals
significantly.
Notable changes:
* Code and types are much simplified.
* Fully documented.
* `Schema` is the single source of truth for information about the AST.
Generators don't have to deal with the complicated `syn` types.
* `Vec`s, `Option`s, `Box`es, and primitive types have their own entries
in the schema.
* Co-locate logic for custom attributes (e.g. `#[visit]`) with the
generators which use those attributes.
* Helpers for parsing attributes, and other common actions.
* Fix logic for calculating type layouts, correctly calculating niches.
* Generation runs in parallel with `rayon`.
Overall intent is to make maintaining/modifying the existing generators,
and adding new ones, much easier. The complex logic of parsing types etc
is abstracted away into the "framework" of `oxc_ast_tools`, leaving the
generators themselves simpler to write and easier to reason about.
Pure refactor. Re-order imports for clarity:
1. `std`
2. External crates
3. `oxc_*` crates
4. Current crate `use crate::...`
5. Super `use super::...`
6. Local modules
This order is from "furthest away" to "closest". This makes it clearer to see what is coming from where.
`cargo +nightly fmt` (#7877) did a lot of the work, but unfortunately `rustfmt` does not have an option to (a) put workspace crates in a separate block from external crates and (b) move `mod` statements to after `use` statements.