Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(codegen): do not print unnecessary parentheses if both sides use the same logical operator #7325

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented Nov 17, 2024

As shown by the changing tests, we don't need to print parentheses for them.

Comparison

In esbuild, it will print parentheses as-is, in SWC, we have the same output now

Copy link

graphite-app bot commented Nov 17, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link

codspeed-hq bot commented Nov 17, 2024

CodSpeed Performance Report

Merging #7325 will not alter performance

Comparing 11-17-refactor_codegen_avoid_printing_unnecessary_parentheses_for_chainexpression_inside_logicalexpression (58db9ef) with main (65f1e82)

Summary

✅ 30 untouched benchmarks

@Dunqing Dunqing changed the title avoid printing unnecessary parentheses for ChainExpression inside LogicalExpression refactor(codegen): avoid printing unnecessary parentheses for ChainExpression inside LogicalExpression Nov 17, 2024
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Nov 17, 2024
@Dunqing Dunqing force-pushed the 11-17-refactor_codegen_avoid_printing_unnecessary_parentheses_for_chainexpression_inside_logicalexpression branch from dddea2a to 00d7921 Compare November 19, 2024 08:12
@Dunqing Dunqing changed the title refactor(codegen): avoid printing unnecessary parentheses for ChainExpression inside LogicalExpression refactor(codegen): do not print unnecessary parentheses if both sides use the same logical operator Nov 19, 2024
@Dunqing Dunqing requested a review from Boshen November 19, 2024 08:21
@Dunqing Dunqing marked this pull request as ready for review November 19, 2024 08:21
Boshen

This comment was marked as abuse.

@Dunqing
Copy link
Member Author

Dunqing commented Nov 19, 2024

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 19, 2024
Copy link

graphite-app bot commented Nov 19, 2024

Merge activity

@Boshen Boshen force-pushed the 11-17-refactor_codegen_avoid_printing_unnecessary_parentheses_for_chainexpression_inside_logicalexpression branch from 00d7921 to 58db9ef Compare November 19, 2024 10:32
@graphite-app graphite-app bot merged commit 58db9ef into main Nov 19, 2024
26 checks passed
@graphite-app graphite-app bot deleted the 11-17-refactor_codegen_avoid_printing_unnecessary_parentheses_for_chainexpression_inside_logicalexpression branch November 19, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-codegen Area - Code Generation 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.

2 participants