use of com.github.javaparser.ast.expr.BinaryExpr.Operator in project drools by kiegroup.
the class DrlxParseUtil method trasformHalfBinaryToBinary.
public static Expression trasformHalfBinaryToBinary(Expression drlxExpr) {
final Optional<Node> parent = drlxExpr.getParentNode();
if (drlxExpr instanceof HalfBinaryExpr && parent.isPresent()) {
HalfBinaryExpr halfBinaryExpr = (HalfBinaryExpr) drlxExpr;
Expression parentLeft = findLeftLeafOfNameExprTraversingParent(halfBinaryExpr);
Operator operator = toBinaryExprOperator(halfBinaryExpr.getOperator());
return new BinaryExpr(parentLeft, halfBinaryExpr.getRight(), operator);
}
return drlxExpr;
}
Aggregations