api documentation for ec_parse
[protos/libecoli.git] / include / ecoli_node_cond.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2019, Olivier MATZ <zer0@droids-corp.org>
3  */
4
5 /**
6  * @defgroup nodes Nodes
7  * @{
8  *
9  * The condition node checks that an expression is true before
10  * parsing/completing the child node. If it is false, the node
11  * doesn't match anything.
12  */
13
14 #ifndef ECOLI_NODE_COND_
15 #define ECOLI_NODE_COND_
16
17 struct ec_node;
18
19 /**
20  * Create a condition node.
21  *
22  * @param id
23  *   The node identifier.
24  * @param cond_str
25  *   The condition string. This is an function-based expression.
26  * @param child
27  *   The ecoli child node.
28  * @return
29  *   The new ecoli cond node.
30  */
31 struct ec_node *ec_node_cond(const char *id, const char *cond_str,
32         struct ec_node *child);
33
34 #endif
35
36 /** @} */