api documentation for ec_parse
[protos/libecoli.git] / include / ecoli_node_dynamic.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2017, Olivier MATZ <zer0@droids-corp.org>
3  */
4
5 /**
6  * @defgroup nodes Nodes
7  * @{
8  */
9
10 #ifndef ECOLI_NODE_DYNAMIC_
11 #define ECOLI_NODE_DYNAMIC_
12
13 struct ec_node;
14 struct ec_pnode;
15
16 /* callback invoked by parse() or complete() to build the dynamic node
17  * the behavior of the node can depend on what is already parsed */
18 typedef struct ec_node *(*ec_node_dynamic_build_t)(
19         struct ec_pnode *pstate, void *opaque);
20
21 struct ec_node *ec_node_dynamic(const char *id, ec_node_dynamic_build_t build,
22                                 void *opaque);
23
24 #endif
25
26 /** @} */