6953 parser.reserve_stack(10);
6959 parser.reserve_stack(20);
The event handler to create a ryml Tree.
void set_callbacks(Callbacks const &c)
set the global callbacks for the library; after a call to this function, these callbacks will be used...
A c-style callbacks class to customize behavior on errors or allocation.
void parse_in_arena(Parser *parser, csubstr filename, csubstr yaml, Tree *tree, id_type node_id)
(1) parse YAML into an existing tree node. The filename will be used in any error messages arising du...
void reserve_arena(size_t arena_cap=RYML_DEFAULT_TREE_ARENA_CAPACITY)
ensure the tree's internal string arena is at least the given capacity
#define CHECK(predicate)
a testing assertion, used only in this quickstart
This is the main driver of parsing logic: it scans the YAML or JSON source for tokens, and emits the appropriate sequence of parsing events to its event handler.
Callbacks const & get_callbacks()
get the global callbacks
ryml::Callbacks callbacks()
static void * s_allocate(size_t len, void *, void *this_)
void reserve(id_type node_capacity=RYML_DEFAULT_TREE_CAPACITY)
static void s_free(void *mem, size_t len, void *this_)