Loading...
Searching...
No Matches
Or node
Grammar nodes

A node that matches one of its child nodes. More...

Collaboration diagram for Or node:

## Macros

#define | EC_NODE_OR(args...)
| Create a new "or" node from an arbitrary list of child nodes.

## Functions

struct ec_node * | ec_node_or (const char *id)
| Create an empty "or" node.
int | ec_node_or_add (struct ec_node *node, struct ec_node *child)
| Add a child to an "or" node.

## Detailed Description

A node that matches one of its child nodes.

Configuration Schema

schema or {
list children {
description "The list of children nodes defining the choice elements.";
node {
description "A child node which is part of the choice.";
}
}
}

## Macro Definition Documentation

## EC_NODE_OR

#define EC_NODE_OR | ( |  | args... | ) |

Value:
__ec_node_or(args, EC_VA_END)
EC_VA_END
#define EC_VA_END
Mark the end of the arguments list in some functions.
Definition utils.h:26

Create a new "or" node from an arbitrary list of child nodes.

All nodes given in the list will be freed when freeing this one, or immediately on error.

Examples
  pool-editline/main.c, readline/main.c, and simple-editline/main.c.

Definition at line 23 of file node_or.h.

## Function Documentation

## ec_node_or_add()

int ec_node_or_add | ( | struct ec_node * | node,
|  | struct ec_node * | child )

Add a child to an "or" node.

The child is consumed and will be freed when the parent is freed, or immediately on error.

Examples
  extension-editline/main.c, pool-editline/main.c, readline/main.c, and simple-editline/main.c.