pub struct PathStep {
pub node: AstNode,
pub stages: Vec<Stage>,
pub focus: Option<String>,
pub index_var: Option<String>,
pub ancestor_label: Option<String>,
pub is_tuple: bool,
}Expand description
A step in a path expression with optional stages
Stages are operations (like predicates) that apply during the step evaluation, not after all steps are complete.
Fields§
§node: AstNodeThe main step node (field name, wildcard, etc.)
stages: Vec<Stage>Stages to apply during this step (e.g., predicates)
focus: Option<String>Set by @$var (focus binding): binds the step’s per-element value to
this variable name (without the $ prefix) during tuple-stream
evaluation. Mirrors jsonata-js’s step.focus.
index_var: Option<String>Set by #$var (index binding): binds the step’s per-element index to
this variable name (without the $ prefix). Mirrors jsonata-js’s
step.index. Replaces the retired AstNode::IndexBind wrapping node.
ancestor_label: Option<String>Set by ast_transform when a later % reference needs this step’s
input value preserved. The label is synthetic (e.g. “!0”, “!1”, …)
and used as a tuple-dict key at runtime. Mirrors jsonata-js’s
step.ancestor.label.
is_tuple: boolTrue when this step must participate in tuple-stream evaluation
(because of its own focus/index_var/ancestor_label, or because
an earlier step in the same path already entered tuple-stream mode).
Mirrors jsonata-js’s step.tuple.