Skip to content

Commit

Permalink
Add index_invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
projkov committed Dec 20, 2023
1 parent 618492b commit bd46761
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fhirpathpy/engine/evaluators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def param_list(ctx, parentData, node):
def union_expression(ctx, parentData, node):
return engine.infix_invoke(ctx, "|", parentData, node["children"])

def index_invocation(ctx, parentData, node):
return util.arraify(ctx["$index"])

def this_invocation(ctx, parentData, node):
return util.arraify(ctx["$this"])
Expand Down Expand Up @@ -316,7 +318,7 @@ def polarity_expression(ctx, parentData, node):
"ThisInvocation": this_invocation,
"MemberInvocation": member_invocation,
"FunctionInvocation": function_invocation,
"IndexInvocation": this_invocation,
"IndexInvocation": index_invocation,
"TotalInvocation": total_invocation,
# expressions
"PolarityExpression": polarity_expression,
Expand Down

0 comments on commit bd46761

Please sign in to comment.