JustBash.Interpreter.Executor.Loop (JustBash v0.4.0)
View SourceExecutes loop constructs: for, while, until.
Handles:
- For loops with word expansion
- While/until loops with condition evaluation
- Break and continue signals with nesting levels
- Loop iteration limits (prevents infinite loops)
Summary
Types
@type result() :: %{ stdout: String.t(), stderr: String.t(), exit_code: non_neg_integer() }
Functions
@spec execute_for(JustBash.t(), String.t(), [any()], [any()], function()) :: {result(), JustBash.t()}
@spec execute_until(JustBash.t(), [any()], [any()], String.t(), function()) :: {result(), JustBash.t()}
@spec execute_while(JustBash.t(), [any()], [any()], String.t(), function()) :: {result(), JustBash.t()}