From 19f0eb49df62e8094d6c8fcd5f8d7522b07ec3d3 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 20 Nov 2012 17:52:21 +0000 Subject: implement unshared output in property specifier --- src/nsgenbind-ast.h | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'src/nsgenbind-ast.h') diff --git a/src/nsgenbind-ast.h b/src/nsgenbind-ast.h index 5ae21b4..544582c 100644 --- a/src/nsgenbind-ast.h +++ b/src/nsgenbind-ast.h @@ -52,7 +52,6 @@ int genbind_ast_dump(struct genbind_node *ast, int indent); /** Depth first left hand search using user provided comparison * * @param node The node to start the search from - * @param prev The node at which to stop the search, either NULL to * search the full tree depth (initial search) or the result * of a previous search to continue. @@ -65,17 +64,51 @@ genbind_node_find(struct genbind_node *node, genbind_callback_t *cb, void *ctx); +/** Depth first left hand search returning nodes of the specified type + * + * @param node The node to start the search from + * @param prev The node at which to stop the search, either NULL to + * search the full tree depth (initial search) or the result + * of a previous search to continue. + * @param nodetype The type of node to seach for + */ struct genbind_node * genbind_node_find_type(struct genbind_node *node, struct genbind_node *prev, - enum genbind_node_type type); + enum genbind_node_type nodetype); +/** Depth first left hand search returning nodes of the specified type + * and a ident child node with matching text + * + * @param node The node to start the search from + * @param prev The node at which to stop the search, either NULL to + * search the full tree depth (initial search) or the result + * of a previous search to continue. + * @param nodetype The type of node to seach for + * @param ident The text to match the ident child node to + */ struct genbind_node * genbind_node_find_type_ident(struct genbind_node *node, struct genbind_node *prev, - enum genbind_node_type type, + enum genbind_node_type nodetype, const char *ident); +/** Depth first left hand search returning nodes of the specified type + * and a type child node with matching text + * + * @param node The node to start the search from + * @param prev The node at which to stop the search, either NULL to + * search the full tree depth (initial search) or the result + * of a previous search to continue. + * @param nodetype The type of node to seach for + * @param type The text to match the type child node to + */ +struct genbind_node * +genbind_node_find_type_type(struct genbind_node *node, + struct genbind_node *prev, + enum genbind_node_type nodetype, + const char *type); + int genbind_node_for_each_type(struct genbind_node *node, enum genbind_node_type type, genbind_callback_t *cb, void *ctx); char *genbind_node_gettext(struct genbind_node *node); -- cgit v1.2.3