Libecoli 0.11.1
Extensible COmmand LIne library
Loading...
Searching...
No Matches
Condition node

A node that conditionally matches based on an expression. More...

Functions

struct ec_nodeec_node_cond (const char *id, const char *cond_str, struct ec_node *child)

Detailed Description

A node that conditionally matches based on an expression.

Configuration Schema

schema cond {
string expr {
description "XXX";
}
node child {
description "The child node.";
}
}

Function Documentation

◆ ec_node_cond()

struct ec_node * ec_node_cond ( const char * id,
const char * cond_str,
struct ec_node * child )

Create a condition node.

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.

Parameters
idThe node identifier.
cond_strThe condition string. This is a function-based expression.
childThe ecoli child node.
Returns
The new ecoli cond node.