cfg_traverse_items()

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

Synopsis:

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

Arguments:

base

A pointer to the base of the configuration tree.

current

A pointer to the current node of the configuration tree.

key

The key value to match during the traversal.

Library:

libasr

Description:

The cfg_traverse_items() function returns subsequent items that match key in a depth-first traversal of the configuration tree rooted at base. To traverse the tree, you call cfg_traverse_items() repeatedly, each time passing the result of the previous call as current. The cfg_traverse_items() function returns NULL when the traversal is complete.

Returns:

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