diff options
author | Jonas Herzig <me@johni0702.de> | 2022-05-25 07:31:35 +0200 |
---|---|---|
committer | Jonas Herzig <me@johni0702.de> | 2022-05-27 08:46:01 +0200 |
commit | 3104e9fdb3c2df7528813e03e4a3e08a3e1a8c2a (patch) | |
tree | cceb4d8cba94ff038491c05c72008e932fbc3ea4 /src | |
parent | 1cf68fed94337060df65a832d0c3c3f5588ad7cb (diff) | |
download | Remap-3104e9fdb3c2df7528813e03e4a3e08a3e1a8c2a.tar.gz Remap-3104e9fdb3c2df7528813e03e4a3e08a3e1a8c2a.tar.bz2 Remap-3104e9fdb3c2df7528813e03e4a3e08a3e1a8c2a.zip |
Support matching binary expressions with @Pattern
Diffstat (limited to 'src')
-rw-r--r-- | src/main/kotlin/com/replaymod/gradle/remap/PsiPattern.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/kotlin/com/replaymod/gradle/remap/PsiPattern.kt b/src/main/kotlin/com/replaymod/gradle/remap/PsiPattern.kt index c1809f7..fcba558 100644 --- a/src/main/kotlin/com/replaymod/gradle/remap/PsiPattern.kt +++ b/src/main/kotlin/com/replaymod/gradle/remap/PsiPattern.kt @@ -89,6 +89,10 @@ internal class PsiPattern( && match(pattern.operand, expr.operand) is PsiParenthesizedExpression -> expr is PsiParenthesizedExpression && match(pattern.expression, expr.expression) + is PsiBinaryExpression -> expr is PsiBinaryExpression + && pattern.operationTokenType == expr.operationTokenType + && match(pattern.lOperand, expr.lOperand) + && match(pattern.rOperand, expr.rOperand) is PsiNewExpression -> expr is PsiNewExpression && pattern.classReference?.resolve() == expr.classReference?.resolve() && match(pattern.qualifier, expr.qualifier) |