Bash.AST.WhileLoop (Bash v0.3.0)

Copy Markdown View Source

While or until loop.

Examples

# while [ condition ]; do body; done
%WhileLoop{
  condition: %Command{name: "test", ...},
  body: [...],
  until: false
}

# until [ condition ]; do body; done
%WhileLoop{
  condition: %Command{name: "test", ...},
  body: [...],
  until: true
}

Summary

Types

t()

@type t() :: %Bash.AST.WhileLoop{
  body: [Bash.Statement.t()],
  condition: Bash.Statement.t(),
  exit_code: 0..255 | nil,
  iteration_count: non_neg_integer() | nil,
  meta: Bash.AST.Meta.t(),
  redirects: [Bash.AST.Redirect.t()],
  state_updates: map(),
  until: boolean()
}

Functions

execute(ast, stdin, session_state)