all repos — hex @ 9f9cdf9a2bc33b624a62f9946f09b409cbe53300

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

Fixes.
h3rald h3rald@h3rald.com
Thu, 21 Nov 2024 14:02:51 +0100
commit

9f9cdf9a2bc33b624a62f9946f09b409cbe53300

parent

5345e120e649bff689a2a493ae3e1b4ab9ffbe50

1 files changed, 13 insertions(+), 0 deletions(-)

jump to
M hex.chex.c

@@ -755,6 +755,19 @@ {

if (hex_valid_native_symbol(token->value)) { element->type = HEX_TYPE_NATIVE_SYMBOL; + HEX_StackElement value; + if (hex_get_symbol(token->value, &value)) + { + element->type = HEX_TYPE_NATIVE_SYMBOL; + element->data.functionPointer = value.data.functionPointer; + } + else + { + hex_error("Unable to reference native symbol: %s", token->value); + hex_free_token(token); + free(quotation); + return 1; + } } else {