Hyperon C
Loading...
Searching...
No Matches
token_api_t Struct Reference

A table of callback functions to implement custom atom parsing. More...

#include <hyperon.h>

Public Attributes

atom_t(* construct_atom )(const char *str, void *context)
 Creates a new Atom based the provided text.
void(* free_context )(void *context)
 Frees the context, passed to tokenizer_register_token(), along with all other associated resources.

Detailed Description

A table of callback functions to implement custom atom parsing.

See also
tokenizer_register_token

Member Data Documentation

◆ construct_atom

atom_t(* token_api_t::construct_atom) (const char *str, void *context)

Creates a new Atom based the provided text.

Parameters
[in]strA pointer to a C-style text string, that matched the associated regular expression
[in]contextA pointer to the context object supplied to tokenizer_register_token()
Returns
An Atom created in response to the supplied text string

◆ free_context

void(* token_api_t::free_context) (void *context)

Frees the context, passed to tokenizer_register_token(), along with all other associated resources.

Parameters
[in]contextThe pointer to the context to free
Note
Assigning NULL to this field means the context does not need to be freed

The documentation for this struct was generated from the following file: