X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=include%2Fecoli_node_cond.h;fp=include%2Fecoli_node_cond.h;h=37da1a45b692552891ed748b8a67143ab854b384;hb=e900ed6e1cb162855289bc7a9acc9b3d1af9d697;hp=0000000000000000000000000000000000000000;hpb=31d70068405038fe6d59d956e363cfa19d77bfa9;p=protos%2Flibecoli.git diff --git a/include/ecoli_node_cond.h b/include/ecoli_node_cond.h new file mode 100644 index 0000000..37da1a4 --- /dev/null +++ b/include/ecoli_node_cond.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2019, Olivier MATZ + */ + +/** + * The condition node checks that an expression is true before + * parsing/completing the child node. If it is false, the node + * doesn't match anything. + */ + +#ifndef ECOLI_NODE_COND_ +#define ECOLI_NODE_COND_ + +struct ec_node; + +/** + * Create a condition node. + * + * @param id + * The node identifier. + * @param cond_str + * The condition string. This is an function-based expression. + * @param child + * The ecoli child node. + * @return + * The new ecoli cond node. + */ +struct ec_node *ec_node_cond(const char *id, const char *cond_str, + struct ec_node *child); + +#endif