Skip to content

refactor(parser): rewrite parse class element#11035

Merged
graphite-app[bot] merged 1 commit intomainfrom
05-14-refactor_parser_rewrite_parse_class_element
May 14, 2025
Merged

refactor(parser): rewrite parse class element#11035
graphite-app[bot] merged 1 commit intomainfrom
05-14-refactor_parser_rewrite_parse_class_element

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented May 14, 2025

closes #10942
closes #11010

Copilot AI review requested due to automatic review settings May 14, 2025 14:15
@github-actions github-actions bot added A-parser Area - Parser A-minifier Area - Minifier A-codegen Area - Code Generation labels May 14, 2025
Copy link
Member Author

Boshen commented May 14, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label May 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Boshen Boshen force-pushed the 05-14-refactor_parser_rewrite_parse_class_element branch from 3fc54c5 to c5ef692 Compare May 14, 2025 14:19
@codspeed-hq
Copy link

codspeed-hq bot commented May 14, 2025

CodSpeed Instrumentation Performance Report

Merging #11035 will not alter performance

Comparing 05-14-refactor_parser_rewrite_parse_class_element (751876b) with main (9a368be)

Summary

✅ 36 untouched benchmarks

@Boshen Boshen force-pushed the 05-14-refactor_parser_rewrite_parse_class_element branch from c5ef692 to 4d3fe36 Compare May 14, 2025 14:31
@github-actions github-actions bot added the A-transformer Area - Transformer / Transpiler label May 14, 2025
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label May 14, 2025
Copy link
Member Author

Boshen commented May 14, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 05-14-refactor_parser_rewrite_parse_class_element branch from 4d3fe36 to 751876b Compare May 14, 2025 14:44
@graphite-app graphite-app bot merged commit 751876b into main May 14, 2025
27 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label May 14, 2025
@graphite-app graphite-app bot deleted the 05-14-refactor_parser_rewrite_parse_class_element branch May 14, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area - Code Generation A-minifier Area - Minifier A-parser Area - Parser A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue parsing repeated static in class field

2 participants