Protocol for traversing and transforming AST nodes.
Each AST node implements this protocol to expose its child statement nodes
and allow reconstruction with updated children. This powers the tree
traversal functions in Bash.AST.
Statement lists in the AST may contain interleaved separator tuples like
{:separator, "\n"} or {:operator, :and}. The protocol implementations
filter these out when returning children and splice them back in during
reconstruction.
Summary
Functions
Returns child statement nodes as a flat list.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec children(t()) :: [Bash.Statement.t()]
Returns child statement nodes as a flat list.