coan 4.2.4
|
![]() |
Files | |
file | symbol.c |
Functions | |
static void | symbol_init (symbol_h sym, char const *name, size_t namelen) |
static void | symbol_copy_init (symbol_h dest, symbol_const_h src) |
static int | symbol_name_compare (symbol_const_h sym, char const *name, size_t namelen) |
static void | report_symbol_configuration (bool define, int gripe, symbol_const_h sym, canonical_string_const_h old_def, canonical_string_const_h new_def, char const *tail) |
static canonical_string_h | symbol_definition_resolve (symbol_const_h sym, ptr_vector_h history) |
static void report_symbol_configuration | ( | bool | define, |
int | gripe, | ||
symbol_const_h | sym, | ||
canonical_string_const_h | old_def, | ||
canonical_string_const_h | new_def, | ||
char const * | tail | ||
) | [static] |
TODO: comments
Definition at line 123 of file symbol.c.
References bail(), canonical_string_text(), GRIPE_DIFFERING_REDEF, GRIPE_DUPLICATE_ARGS, GRIPE_GARBAGE_ARG, GRIPE_GLOBAL_FUNCTION_LIKE_MACRO_DEFINITION, GRIPE_INSOURCE_FUNCTION_LIKE_MACRO_DEFINITION, GRIPE_INVALID_ARGS, GRIPE_TRANSIENT_SYMBOL_ADDED, GRIPE_UNDEFING_DEFINED, report(), and symbol_name().
Referenced by symbol_define(), and symbol_undefine().
static void symbol_copy_init | ( | symbol_h | dest, |
symbol_const_h | src | ||
) | [static] |
Initialise a symbol from another
dest | The symbol to initialise. Is assumed to control only unitialised storage. |
src | The symbol to be copied. |
dest is initialised as a copy of src
Definition at line 76 of file symbol.c.
References canonical_string_copy(), clone(), eval_result::flags, eval_result::most_resolved, eval_result::sym_def, eval_result::sym_name, and eval_result::value.
Referenced by symbol_copy().
static canonical_string_h symbol_definition_resolve | ( | symbol_const_h | sym, |
ptr_vector_h | history | ||
) | [static] |
Get the most resolved form of a reference to a defined symbol.
sym | The symbol whose most resolved form is wanted. |
history | A ptr_vector_h containing the the configured symbols that have been passed as the first parameter to recursively ancestral calls to the symbol_resolve(), to be passed to further calls to that function. |
The function obtains the most resolved form of a symbol reference where the symbol has a definition.
Definition at line 239 of file symbol.c.
References canonical_string_copy(), canonical_string_dispose(), canonical_string_replace(), canonical_string_text(), configured_symbol_find(), symbol_definition(), symbol_name(), and symbol_resolve().
Referenced by symbol_resolve().
static void symbol_init | ( | symbol_h | sym, |
char const * | name, | ||
size_t | namelen | ||
) | [static] |
Initialise a symbol.
sym | The symbol to initialise. Is assumed to control only unitialised storage. |
name | The name of this symbol. |
namelen | The length of name. |
Definition at line 62 of file symbol.c.
References clone(), eval_result_clear(), and eval_result::sym_name.
Referenced by symbol_new().
static int symbol_name_compare | ( | symbol_const_h | sym, |
char const * | name, | ||
size_t | namelen | ||
) | [static] |
Compare a symbol with a specified name.
sym | The symbol to compare |
name | The name to compare |
namelen | The length of the name. |
Definition at line 101 of file symbol.c.
References symbol_name().
Referenced by symbol_compare().