Skip to content

Conversation

antonsviridov-src
Copy link
Contributor

Yet another possible tree wasn't handled, so we add support for it.
This time we don't add anything to semanticdb as it's meaningless.

Test plan

  • new snapshot test

@@ -160,6 +161,9 @@ private Semanticdb.Tree annotationParameter(ExpressionTree expr) {
unaryOpTree(
semanticdbUnaryOperator(unaryExpr.getKind()),
annotationParameter(unaryExpr.getExpression())));
} else if (expr instanceof ParenthesizedTree) {
ParenthesizedTree parenExpr = (ParenthesizedTree) expr;
return annotationParameter(parenExpr.getExpression());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olafurpg can you confirm it's fine to drill into subtree without creating intermediate semanticdb nodes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. No need to encode parentheses here, we can add it later if necessary


@Nullable(("what"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the new parenthesized node

@antonsviridov-src antonsviridov-src marked this pull request as ready for review August 6, 2024 11:03
@antonsviridov-src antonsviridov-src merged commit 4e5dfd3 into main Aug 6, 2024
15 checks passed
@antonsviridov-src antonsviridov-src deleted the GRAPH-775-fix-parenthesized-tree branch August 6, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants