24 lines
598 B
C
24 lines
598 B
C
#include "ast.h"
|
|
|
|
static enum bshell_status collect_children(
|
|
struct ast_node *node,
|
|
struct ast_iterator *it)
|
|
{
|
|
struct pipeline_ast_node *pipeline = (struct pipeline_ast_node *)node;
|
|
fx_queue_entry *cur = fx_queue_first(&pipeline->n_stages);
|
|
while (cur) {
|
|
struct ast_node *child
|
|
= fx_unbox(struct ast_node, cur, n_entry);
|
|
ast_iterator_enqueue(it, child);
|
|
cur = fx_queue_next(cur);
|
|
}
|
|
|
|
return BSHELL_SUCCESS;
|
|
}
|
|
|
|
struct ast_node_definition pipeline_ast_node = {
|
|
.def_id = AST_PIPELINE,
|
|
.def_node_size = sizeof(struct pipeline_ast_node),
|
|
.def_collect_children = collect_children,
|
|
};
|