factorize integer parsing
[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  * The condition node checks that an expression is true before
7  * parsing/completing the child node. If it is false, the node
8  * doesn't match anything.
9  */
10
11 #ifndef ECOLI_NODE_COND_
12 #define ECOLI_NODE_COND_
13
14 struct ec_node;
15
16 /**
17  * Create a condition node.
18  *
19  * @param id
20  *   The node identifier.
21  * @param cond_str
22  *   The condition string. This is an function-based expression.
23  * @param child
24  *   The ecoli child node.
25  * @return
26  *   The new ecoli cond node.
27  */
28 struct ec_node *ec_node_cond(const char *id, const char *cond_str,
29         struct ec_node *child);
30
31 #endif