-
Notifications
You must be signed in to change notification settings - Fork 341
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
Make Groovy Parser correctly handle nested parenthesis #4718
base: main
Are you sure you want to change the base?
Make Groovy Parser correctly handle nested parenthesis #4718
Conversation
8579420
to
378fe5b
Compare
@@ -1664,9 +1667,13 @@ public void visitMethodCallExpression(MethodCallExpression call) { | |||
Expression selectExpr = visit(call.getObjectExpression()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some changes below this line, but I have the feeling I am at the wrong track. For instance with following groovy code:
(map.get("foo")).equals("bar")`
I can retrieve here an expression that looks printed like (map.get("foo")
. I think you would expect it evenly distributed like (map.get("foo"))
. So maybe that's what should be changed instead of the code here below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stop working on this for now. I can't wrap my head around how the parentheses are set. I probably need a little bit more experience before I start working on parser code 😇.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-core/src/main/java/org/openrewrite/internal/AdaptiveRadixTree.java
- lines 594-594
- rewrite-core/src/main/java/org/openrewrite/internal/lang/NonNull.java
- lines 18-18
- lines 43-43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-core/src/main/java/org/openrewrite/internal/AdaptiveRadixTree.java
- lines 594-594
- rewrite-core/src/main/java/org/openrewrite/internal/lang/NonNull.java
- lines 18-18
- lines 43-43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-core/src/main/java/org/openrewrite/internal/AdaptiveRadixTree.java
- lines 594-594
- rewrite-core/src/main/java/org/openrewrite/internal/lang/NonNull.java
- lines 18-18
- lines 43-43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-core/src/main/java/org/openrewrite/internal/AdaptiveRadixTree.java
- lines 594-594
- rewrite-core/src/main/java/org/openrewrite/internal/lang/NonNull.java
- lines 18-18
- lines 43-43
bc3b03b
to
fe98f02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-core/src/main/java/org/openrewrite/internal/AdaptiveRadixTree.java
- lines 594-594
- rewrite-core/src/main/java/org/openrewrite/internal/lang/NonNull.java
- lines 18-18
- lines 43-43
fe98f02
to
b7e03e9
Compare
5c22da6
to
fe378e2
Compare
What's changed?
Nested parentheses are supported as well for the groovy parser.
What's your motivation?
Checklist