Skip to content

refactor(parser): rename ModifierFlags to ModifierKinds#20739

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/03-23-refactor_parser_rename_modifierflags_to_modifierkinds_
Mar 26, 2026
Merged

refactor(parser): rename ModifierFlags to ModifierKinds#20739
graphite-app[bot] merged 1 commit intomainfrom
om/03-23-refactor_parser_rename_modifierflags_to_modifierkinds_

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Mar 25, 2026

Pure refactor. Rename ModifierFlags to ModifierKinds. This type represents a collection of ModifierKinds, and after #20738 it's no longer implemented as bitflags!, so the name is no longer appropriate.

This PR is pure renaming - rename the type, and variables that hold the type.

Copy link
Copy Markdown
Member Author

overlookmotel commented Mar 25, 2026


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 changes, fast-track this PR to the front of 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.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Mar 25, 2026
@overlookmotel overlookmotel marked this pull request as ready for review March 25, 2026 15:47
Copilot AI review requested due to automatic review settings March 25, 2026 15:47
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 25, 2026

Merging this PR will not alter performance

✅ 44 untouched benchmarks
⏩ 12 skipped benchmarks1


Comparing om/03-23-refactor_parser_rename_modifierflags_to_modifierkinds_ (0c15f8f) with main (5aee74c)

Open in CodSpeed

Footnotes

  1. 12 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Copy Markdown
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 updates the TypeScript/JavaScript parser modifier-set type naming to reflect its semantics: renaming ModifierFlags to ModifierKinds now that the representation is no longer a bitflags!-style flags type.

Changes:

  • Rename the modifier set type from ModifierFlags to ModifierKinds.
  • Update parser call sites and local variables to use ModifierKinds consistently.
  • Update diagnostics signatures/helpers that accept “allowed modifiers” sets.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/oxc_parser/src/ts/types.rs Update modifier verification call sites to use ModifierKinds.
crates/oxc_parser/src/ts/statement.rs Replace ModifierFlags usage/imports with ModifierKinds in TS statement parsing.
crates/oxc_parser/src/modifiers.rs Rename the core modifier-set type and propagate the rename through parsing/validation logic and stored fields.
crates/oxc_parser/src/js/statement.rs Update enum-const modifier construction to use ModifierKinds.
crates/oxc_parser/src/js/object.rs Update modifier verification call sites/imports to ModifierKinds.
crates/oxc_parser/src/js/module.rs Update default export class modifier construction to ModifierKinds.
crates/oxc_parser/src/js/function.rs Update parameter/function modifier allowlists to ModifierKinds.
crates/oxc_parser/src/js/class.rs Update class-element modifier allowlists and constants to ModifierKinds.
crates/oxc_parser/src/diagnostics.rs Update diagnostics helper signatures and imports to accept Option<ModifierKinds>.

@overlookmotel overlookmotel force-pushed the om/03-23-refactor_parser_rename_modifierflags_to_modifierkinds_ branch from bcd1734 to f72933b Compare March 25, 2026 19:01
@graphite-app graphite-app bot force-pushed the om/03-23-refactor_parser_simplify_modifierflags_ branch 2 times, most recently from a590ebe to 6587e2d Compare March 25, 2026 19:12
@graphite-app graphite-app bot force-pushed the om/03-23-refactor_parser_rename_modifierflags_to_modifierkinds_ branch from f72933b to 0b12df6 Compare March 25, 2026 19:12
@overlookmotel overlookmotel force-pushed the om/03-23-refactor_parser_rename_modifierflags_to_modifierkinds_ branch from 0b12df6 to 9d5b470 Compare March 25, 2026 19:13
@overlookmotel overlookmotel force-pushed the om/03-23-refactor_parser_simplify_modifierflags_ branch from 6587e2d to 33e028e Compare March 25, 2026 19:13
@graphite-app graphite-app bot changed the base branch from om/03-23-refactor_parser_simplify_modifierflags_ to graphite-base/20739 March 26, 2026 13:08
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Mar 26, 2026

Merge activity

@graphite-app graphite-app bot changed the base branch from graphite-base/20739 to main March 26, 2026 13:12
@camc314 camc314 force-pushed the om/03-23-refactor_parser_rename_modifierflags_to_modifierkinds_ branch from 9d5b470 to 0c15f8f Compare March 26, 2026 13:24
@camc314
Copy link
Copy Markdown
Contributor

camc314 commented Mar 26, 2026

Didnt push any code changes, just restacked, because it ended up with conflicts (somehow)

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Mar 26, 2026
Pure refactor. Rename `ModifierFlags` to `ModifierKinds`. This type represents a collection of `ModifierKind`s, and after #20738 it's no longer implemented as `bitflags!`, so the name is no longer appropriate.

This PR is pure renaming - rename the type, and variables that hold the type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser 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.

3 participants