|
x-engine-c v0.2.13
The C engine for x-lang
|
S-expression analyser, reader, writer, and display for symbols. More...
#include "x-token/sexp/symbol.h"#include "x-eval.h"#include "x-token.h"#include "x-type/buffer.h"#include "x-type/str.h"#include "x-type/symbol.h"Functions | |
| x_obj_t * | x_sexp_symbol_analyse (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_sexp_symbol_read (x_obj_t *p_base, x_obj_t *p_args) |
Variables | |
| x_satom_t | x_sexp_symbol_analyse_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { .fn = x_sexp_symbol_analyse }) |
| x_satom_t | x_sexp_symbol_read_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { .fn = x_sexp_symbol_read }) |
S-expression analyser, reader, writer, and display for symbols.
Analyse: match any non-delimiter sequence as a symbol.
Symbols are the fallback token type. If no delimiter is found, the analyser keeps reading. When a delimiter terminates the sequence, the buffer length is scored as a negative value so that more specific types (which score positively) always win ties.
| p_base | Base (execution context). |
| p_args | Read-args containing the token buffer and score. |
Read a symbol from the token buffer.
Copies the buffer contents into a new string, then interns it as a symbol through x_type_symbol_make.
| p_base | Base (execution context). |
| p_args | Read-args containing the token buffer. |
| x_satom_t x_sexp_symbol_analyse_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { .fn = x_sexp_symbol_analyse }) |
| x_satom_t x_sexp_symbol_read_prim = x_obj_set(x_type_atom_obj, X_OBJ_FLAG_NONE, { .fn = x_sexp_symbol_read }) |