pivot method

Object? pivot(
  1. DataInstance? model,
  2. EvaluationContext context,
  3. List<Object> pivots,
  4. Object sentinel,
)

Pivots this expression around sentinel (the validated node's reference), adding CmpPivots to pivots.

Returns sentinel when the value is the node, null when it depends on it in a supported way, otherwise the evaluated value. Throws UnpivotableExpressionException when the dependency can't be expressed as pivots.

Port of XPathExpression.pivot; see pivotsOf.

Implementation

Object? pivot(
  DataInstance? model,
  EvaluationContext context,
  List<Object> pivots,
  Object sentinel,
) => eval(model, context);