feat(parser): check mixed coalesce and new exponential with preserveParens:false#11264
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 handling of mixed coalesce and exponential expressions in the parser by removing check functions from the semantic checker and moving the logic into the parser. Key changes include:
- Removing BinaryExpression and LogicalExpression checks in the semantic checker.
- Updating the parser logic to track parenthesized expressions and to perform mixed coalesce and exponential operator validations.
- Relocating diagnostic functions to a dedicated diagnostics module.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/oxc_semantic/src/checker/mod.rs | Removed redundant checks for binary and logical expressions. |
| crates/oxc_semantic/src/checker/javascript.rs | Removed functions related to exponential and mixed coalesce. |
| crates/oxc_parser/src/js/expression.rs | Updated parser to pass parenthesized flags and enhanced error checking. |
| crates/oxc_parser/src/diagnostics.rs | Added diagnostic functions for mixed coalesce and exponential operators. |
CodSpeed Instrumentation Performance ReportMerging #11264 will not alter performanceComparing Summary
|
Merge activity
|
704707b to
2398906
Compare

No description provided.