Skip to content

feat(parser): check mixed coalesce and new exponential with preserveParens:false#11264

Merged
graphite-app[bot] merged 1 commit intomainfrom
05-24-feat_parser_check_mixed_coalesce_and_new_exponential_with_preserveparens_false_
May 24, 2025
Merged

feat(parser): check mixed coalesce and new exponential with preserveParens:false#11264
graphite-app[bot] merged 1 commit intomainfrom
05-24-feat_parser_check_mixed_coalesce_and_new_exponential_with_preserveparens_false_

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented May 24, 2025

No description provided.

Copilot AI review requested due to automatic review settings May 24, 2025 05:09
@Boshen Boshen requested a review from Dunqing as a code owner May 24, 2025 05:09
@github-actions github-actions bot added A-parser Area - Parser A-semantic Area - Semantic labels May 24, 2025
Copy link
Member Author

Boshen commented May 24, 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-enhancement Category - New feature or request label May 24, 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 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-hq
Copy link

codspeed-hq bot commented May 24, 2025

CodSpeed Instrumentation Performance Report

Merging #11264 will not alter performance

Comparing 05-24-feat_parser_check_mixed_coalesce_and_new_exponential_with_preserveparens_false_ (2398906) with main (aa510cf)

Summary

✅ 38 untouched benchmarks

@graphite-app
Copy link
Contributor

graphite-app bot commented May 24, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 05-24-feat_parser_check_mixed_coalesce_and_new_exponential_with_preserveparens_false_ branch from 704707b to 2398906 Compare May 24, 2025 05:18
@graphite-app graphite-app bot merged commit 2398906 into main May 24, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 05-24-feat_parser_check_mixed_coalesce_and_new_exponential_with_preserveparens_false_ branch May 24, 2025 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser A-semantic Area - Semantic C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants