ecoli_node_once(3)
π ecoli_node_once(3) β the Libecoli manual, bestie edition π
okay so real quick, this is a page from Libecoli, manual section 3, and it's about ecoli_node_once β the Once node. yes, the name is literally the whole vibe. let's get into it β¨
πΈ NAME πΈ
ecoli_node_once β Once node
- A node that prevents its child from being parsed more than once. π«Ά
that's it. that's the pitch. lowkey iconic.
β¨ SYNOPSIS β¨
Functions
struct ec_node * ec_node_once (const char *id, struct ec_node *child)
int ec_node_once_set_child (struct ec_node *node, struct ec_node *child)
two functions, that's the whole roster. slay π
π¦ Detailed Description π¦
A node that prevents its child from being parsed more than once. fr fr, that's the entire personality β it wraps your child node and makes sure the parser doesn't come back for seconds.
π Configuration Schema π
here's the schema, verbatim, no cap:
schema once {
node child {
description "The child node.";
}
}
so the one thing it's got going on config-wise is child, and the description literally just says it's the child node. minimal. main character energy. π
π Function Documentation π
π struct ec_node* ec_node_once (const char * id, struct ec_node * child)
This node behaves like its child, but prevents it from being parsed more than once. like, it is the child, but with boundaries. π§
Example β here's the exact snippet:
many(
or(
once(str("foo")),
str("bar")))
Matches: [], ['foo', 'bar'], ['bar', 'bar'], ['foo', 'bar', 'bar'], ...
But not: ['foo', 'foo'], ['foo', 'bar', 'foo'], ...
see how foo never shows up twice? that's the once node doing its little job. π§
β οΈ heads up: on error, the child is not freed. so don't go assuming it got cleaned up for you, bestie β that leak is on you. π
πΈ int ec_node_once_set_child (struct ec_node * node, struct ec_node * child)
Set the child of a once node.
β οΈ and yeah, this one's different: on error, the child is freed. opposite energy from the constructor above. don't mix 'em up. π
π Author π
Generated automatically by Doxygen for Libecoli from the source code. so nobody hand-wrote this, the robots did it, and honestly? they ate. π€β¨
and that's the page!! π it's Libecoli Version 0.11.3, dated Thu Apr 9 2026 β mwah, go parse something responsibly, bestie πππ¦
π¦ where this page comes from
- epel 9: libecoli-devel 0.11.3-1.el9 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms