Commit graph

28 commits

Author SHA1 Message Date
dalaoshu
d18c896a2c
perf(rust): use cow_utils instead (#5664)
Related to #5586 and #5662

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-09-11 18:39:30 +08:00
IWANABETHATGUY
e38114b825
fix(ast_tools): fix ast-tool panic (#5641)
`just ast` panic due to
553262842c,
change the filename to makesure `ast_tool` still working
1. crates/oxc_span/src/source_type/types.rs is removed in
553262842c
2024-09-09 17:57:20 +08:00
Boshen
63a830e08c
chore(dprint): format toml files (#5599)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-09-08 14:26:16 +08:00
rzvxa
c78a8507d1 refactor(ast_tools): only use type names to ignore fields in the DeriveContentHash. (#5573)
related to https://github.com/oxc-project/backlog/issues/107
2024-09-07 09:57:25 +00:00
rzvxa
db55fb0fce fix(ast_tools, ci): watch tasks/ast_tools instead of tasks/ast_codegen. (#5576)
I was so confused as to why the `AST Changes` step wasn't running at times. Turns out we weren't watching it at all😅

This means for a duration of time we weren't running the `AST Changes` step on PRs that edited only `ast_tools` that didn't update any side-effects.
2024-09-07 09:41:18 +00:00
rzvxa
7a6b64c3f0 refactor(ast_tools): remove unsafe code from logger. (#5574)
https://github.com/oxc-project/oxc/pull/5519#discussion_r1747097404
2024-09-07 09:03:26 +00:00
overlookmotel
14ee086182 refactor(ast): inline AstKind::as_* methods (#5547)
One would hope compiler will inline these trivial methods anyway, but mark them `#[inline]` to make sure.
2024-09-06 14:31:17 +00:00
rzvxa
b4f75967bd refactor(ast_tools): add some minimal logging. (#5519) 2024-09-06 06:19:50 +00:00
Boshen
1bed5ce2a5 chore: run cargo +nightly fmt to sort imports (#5503)
They are never going to be stable are they ... cedf7a4daa/.rustfmt.toml (L8-L16)
2024-09-06 04:04:26 +00:00
rzvxa
10e8984d93 ci: fix paths in the .generated_ast_watch_list.yml. (#5520) 2024-09-06 03:23:26 +00:00
Boshen
c3cfbfb480 chore: clippy::allow_attributes (#5521)
https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#expectlint

https://rust-lang.github.io/rust-clippy/master/index.html#/allow_attributes
2024-09-06 03:07:02 +00:00
IWANABETHATGUY
b96bea4f0d fix: add back lifetime (#5507)
closed #5506
2024-09-05 17:47:58 +00:00
IWANABETHATGUY
cedf7a4daa feat(xtask): impl as_ast_kind method for each variant (#5491) 2024-09-05 16:17:08 +00:00
rzvxa
ccc8a27e4f refactor(ast, ast_tools): use full method path for generated derives trait calls. (#5462)
As of now if we remove the implementation of a trait for a type and implement the method on that type directly it wouldn't break while it isn't the original trait anymore so that method might do something entirely different.
This change is more explicit on trait calls so we hit compile errors on these kinds of changes.
2024-09-05 05:36:50 +00:00
rzvxa
90facd3657 feat(ast): add ContentHash trait; remove noop Hash implementation from Span (#5451)
closes #5283

Also removes the noop Hash implementation on `Span` in favor of a real implementation.
2024-09-05 07:20:04 +03:30
overlookmotel
d9d7e7c596 refactor(ast): remove IdentifierName from TSThisParameter (#5327)
`TSThisParameter` does not need to include an `IdentifierName` which is always "this". Just storing the `Span` is sufficient.
2024-09-04 12:46:53 +00:00
rzvxa
23285f431d feat(ast): add ContentEq trait. (#5427)
Part of #5283
2024-09-04 11:53:50 +00:00
rzvxa
59abf27d95 feat(ast, parser): add oxc_regular_expression types to the parser and AST. (#5256)
closes #5060
2024-09-03 02:36:37 +00:00
rzvxa
68a1c01f4e feat(ast_tools): add dedicated Derive trait. (#5278)
In an effort toward the implementation of #5256, this PR allows us to have a separately generated "derive" file for each crate.
This also eliminates a bunch of boilerplate when writing new "derive" generators and generally makes it more approachable.
2024-09-03 02:36:36 +00:00
Boshen
2fbc283e03
chore: bump rustc to v1.80.1 (#5211) 2024-08-26 13:11:29 +08:00
overlookmotel
f63b568c48 refactor(ast): remove #[non_exhaustive] attr from AstBuilder (#5130)
Partially revert #4925. That PR's description gave no explanation of why this attribute is desirable.
2024-08-23 23:04:28 +00:00
overlookmotel
8650d3e773 refactor(ast_tools): remove support for #[scope(if(...))] attr (#5113)
There are no longer any nodes with conditional scopes. Remove support for `#[scope(if(...))]` attr from `ast_tools` - it's no longer needed.
2024-08-23 09:28:17 +00:00
overlookmotel
c4c08a7433 refactor(ast)!: rename IdentifierReference::reference_flags field (#5024)
Part of #4991.
2024-08-21 00:19:57 +00:00
overlookmotel
d262a58eb5 refactor(syntax)!: rename ReferenceFlag to ReferenceFlags (#5023)
Part of #4991.
2024-08-21 00:19:56 +00:00
DonIsaac
96422b6489 refactor(ast): make AstBuilder non-exhaustive (#4925) 2024-08-19 05:32:30 +00:00
rzvxa
47c9552ecf docs(ast, ast_macros, ast_tools): better documentation for Ast helper attributes. (#4856) 2024-08-15 11:32:36 +00:00
overlookmotel
90d0b2ba65 refactor(allocator, ast, span, ast_tools): use allocator as var name for Allocator (#4900)
We mostly use `allocator` as var name for an `Allocator`, but in some places used the shorter name `alloc`. Use `allocator` everywhere for consistency.
2024-08-15 10:49:11 +00:00
rzvxa
8e8fcd0584 refactor(ast_tools): rename oxc_ast_codegen to oxc_ast_tools. (#4846)
This PR renames the `oxc_ast_codegen` crate to `oxc_ast_tools`, It improves the readability and organization of the codebase by giving the crate a name that better reflects its purpose and contents.

It also improves the error message in CI.
2024-08-12 14:33:58 +00:00