public static OperationNode resolve(ExpressionNode left, Operator op, ExpressionNode right) {
        if ( ! (left instanceof OperationNode leftArithmetic)) return new OperationNode(left, op, right);

        List<ExpressionNode> newChildren = new ArrayList<>(leftArithmetic.children());
        newChildren.add(right);

        List<Operator> newOperators = new ArrayList<>(leftArithmetic.operators());
        newOperators.add(op);

        return new OperationNode(newChildren, newOperators);
    }
Returns true if this node has lower precedence than the parent
(even though by virtue of being a node it will be calculated before the parent).
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/OperationNode.java