Include MethodCall.getAChild in {Unary,Binary}Operation.getAChild

This commit is contained in:
Tom Hvitved
2021-09-24 12:08:54 +02:00
parent edfdfb1fa4
commit 30d2df53c6
3 changed files with 287 additions and 283 deletions

View File

@@ -30,6 +30,8 @@ class UnaryOperation extends Operation, MethodCall instanceof UnaryOperationImpl
final override AstNode getAChild(string pred) {
result = Operation.super.getAChild(pred)
or
result = MethodCall.super.getAChild(pred)
or
pred = "getOperand" and result = this.getOperand()
}
@@ -127,6 +129,8 @@ class BinaryOperation extends Operation, MethodCall instanceof BinaryOperationIm
override AstNode getAChild(string pred) {
result = Operation.super.getAChild(pred)
or
result = MethodCall.super.getAChild(pred)
or
pred = "getLeftOperand" and result = this.getLeftOperand()
or
pred = "getRightOperand" and result = this.getRightOperand()