refactor(ast_tools): remove COMMENTS variant modifier from raw transfer codegen#20361
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
Refactors the raw-transfer deserializer codegen to remove the redundant COMMENTS variant flag and gate comment access via the existing LINTER flag, aligning with how Oxlint exposes Program.comments.
Changes:
- Remove the
COMMENTSflag from raw-transfer variant generation and reduce the flag set from 7 to 6. - Switch AST-id invalidation logic to key off
LINTERinstead ofCOMMENTS. - Update the Program raw deserializer template to conditionally include the
commentsgetter underLINTER.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/ast_tools/src/generators/raw_transfer.rs | Drops the COMMENTS flag from variant generation and adjusts related codegen paths/flags. |
| crates/oxc_ast/src/serialize/mod.rs | Changes the raw-deserializer template so Program.comments is included only for the LINTER variant. |
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
…sfer codegen (#20361) Refactor. The `COMMENTS` flag is redundant as the AST only has a `comments` property in Oxlint, and we already have a `LINTER` flag - use that instead.
f2c54e7 to
4240164
Compare
…sfer codegen (#20361) Refactor. The `COMMENTS` flag is redundant as the AST only has a `comments` property in Oxlint, and we already have a `LINTER` flag - use that instead.
4240164 to
b9f09fc
Compare

Refactor. The
COMMENTSflag is redundant as the AST only has acommentsproperty in Oxlint, and we already have aLINTERflag - use that instead.