cfg_traverse()

Return the next node in a depth-first traversal of a configuration tree.

Synopsis:

#include <asr/cfg.h>
 
cfg_item_t* cfg_traverse(const cfg_item_t *base, const cfg_item_t *current)

Arguments:

base

A pointer to the base of the configuration tree.

current

A pointer to the current node of the configuration tree.

Library:

libasr

Description:

The cfg_traverse() function returns subsequent items in a depth-first traversal of the configuration tree rooted at base. To traverse the tree, you call cfg_traverse() repeatedly, each time passing the result of the previous call as current. cfg_traverse() returns NULL if current is equal to base (i.e., base was returned by the last call), indicating the traversal is complete.

Returns:

A pointer to the next node in the traversal of the configuration tree.