Skip to main content

program_to_plan

Function program_to_plan 

Source
pub fn program_to_plan(program: &Program) -> ExecutionPlan
Expand description

Convert a parsed Program into an ExecutionPlan.

Maps the program’s AST structure to a flat sequence of execution steps:

  • Pipelines connected by && or || operators become sequential steps with gates
  • Commands within a pipeline connected by | or |& become pipe steps
  • Optional commands (trailing ?) are grouped into context accumulation blocks