use of au.csiro.pathling.fhirpath.operator.Operator in project pathling by aehrc.
the class Visitor method visitBinaryOperator.
@Nonnull
private FhirPath visitBinaryOperator(@Nullable final ParseTree leftContext, @Nullable final ParseTree rightContext, @Nullable final String operatorName) {
checkNotNull(operatorName);
// Parse the left and right expressions.
final FhirPath left = new Visitor(context).visit(leftContext);
final FhirPath right = new Visitor(context).visit(rightContext);
// Retrieve an Operator instance based upon the operator string.
final Operator operator = Operator.getInstance(operatorName);
final OperatorInput operatorInput = new OperatorInput(context, left, right);
return operator.invoke(operatorInput);
}
Aggregations