docs: function predicateExprHasPositionalSelector(expr, isRecursiveCall) {
    if (!expr) {
      return false;
    }
    if (!isRecursiveCall && exprReturnsNumberValue(expr)) {
      // this is a "proximity position"-based predicate
      return true;
    }
    if (expr instanceof FunctionCallExpr) {
      var value = expr.name.value;
      return (value == 'last' || value == 'position');
    }
    if (expr instanceof BinaryExpr) {
      return (
        predicateExprHasPositionalSelector(expr.expr1, true) ||
        predicateExprHasPositionalSelector(expr.expr2, true));
    }
    return false;
  }