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

feat: print minimal amount of round brackets in sniper mode #3823

Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a438c09
Add naive implementation that considers only precedence
slarse Mar 4, 2021
606c90a
Preserve AST structure
slarse Mar 4, 2021
f9038e7
Add test to verify that unary operator parentheses are kept
slarse Mar 4, 2021
5680169
Refactor duplicated test logic into parameterized test
slarse Mar 4, 2021
a9bdf76
Fix parenthesis optimization associativity rule when parent has highe…
slarse Mar 4, 2021
6dc3bed
Add another expression
slarse Mar 4, 2021
e2115a3
Add parameterized test for testing statements
slarse Mar 4, 2021
89ff049
Add support for optimizing parentheses of unary operators
slarse Mar 4, 2021
f1aa4d4
Positiong overloads next to each other
slarse Mar 4, 2021
6f91d65
Add test expressions for bitwise operators
slarse Mar 4, 2021
848402a
Add explicit contracts to test cases
slarse Mar 4, 2021
43f7d95
Refactor test cases
slarse Mar 4, 2021
bf84230
Fix style issues
slarse Mar 4, 2021
9d00a64
Refactor
slarse Mar 4, 2021
41db039
Remove unused imports
slarse Mar 4, 2021
0ff1a45
Clarify intent by removing negation
slarse Mar 4, 2021
f831167
Adjust note on optimizeParentheses field
slarse Mar 4, 2021
03de60d
Merge branch 'master' into issue/3809-print-minimal-brackets-for-uop-…
slarse Mar 8, 2021
ea40045
Refactor parenthesis calculation into separate class
slarse Mar 8, 2021
636624e
Activate parenthesis optimization for sniper printer
slarse Mar 8, 2021
ad087f8
Document parenthesis optimization
slarse Mar 8, 2021
2e2c406
Reformat ParenOptimizer with tabs
slarse Mar 8, 2021
df6bcf1
Add private constructor to ParenOptimizer
slarse Mar 8, 2021
e584ae5
Revert redundant whitespace changes
slarse Mar 8, 2021
b664773
Remove redundant blank line
slarse Mar 8, 2021
2e83211
Add license header
slarse Mar 8, 2021
e5c82d5
Fix broken test
slarse Mar 8, 2021
db058e1
Revise terminology: parenthesis -> round bracket, optimize -> minimize
slarse Mar 9, 2021
73338f7
Fix indentation
slarse Mar 9, 2021
a6a43e9
Remove funky header formatting inserted by IntelliJ
slarse Mar 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into issue/3809-print-minimal-brackets-for-uop-…
…and-binop
  • Loading branch information
slarse committed Mar 8, 2021
commit 03de60d6c34f0524b83253c6a73db737fec35096

This merge commit was added into this branch cleanly.

There are no new changes to show, but you can still view the diff.