refactor(parser): rewrite parse class element#11035
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the parsing of class element modifiers and updates related tests and diagnostics. Key changes include:
- Refactoring parsing logic to separate handling of static and get/set modifiers in modifiers.rs.
- Removing the deprecated static constructor diagnostic in diagnostics.rs.
- Updating TypeScript integration tests and snapshots to reflect new handling for duplicate static keywords.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/oxc_parser/src/modifiers.rs | Refactored modifier parsing logic including visibility and token handling. |
| crates/oxc_parser/src/diagnostics.rs | Removed static constructor diagnostic as part of cleanup. |
| crates/oxc_minifier/src/peephole/substitute_alternate_syntax.rs | Removed a now-redundant test case regarding static modifier syntax. |
| crates/oxc_codegen/tests/integration/ts.rs | Added a test case with multiple static keywords in a class. |
| crates/oxc_codegen/tests/integration/snapshots/ts.snap and minify.snap | Updated snapshots reflecting the handling of duplicate static keywords. |
3fc54c5 to
c5ef692
Compare
CodSpeed Instrumentation Performance ReportMerging #11035 will not alter performanceComparing Summary
|
c5ef692 to
4d3fe36
Compare
Merge activity
|
4d3fe36 to
751876b
Compare

closes #10942
closes #11010