all repos — hex @ 42b2594d1f35ef880b23dc4f139bba1d8111283e

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

Fixes.
h3rald h3rald@h3rald.com
Sat, 28 Dec 2024 16:31:46 +0100
commit

42b2594d1f35ef880b23dc4f139bba1d8111283e

parent

5f2f014ffc2515fbdedba581e3bcaed6122dbd4b

3 files changed, 7 insertions(+), 2 deletions(-)

jump to
M scripts/test.hexscripts/test.hex

@@ -27,6 +27,7 @@ )

if ) ( + "test" throw ; Store error errors " - Test #" test-count dec cat ": " cat error cat ' cat "errors" : "x" print
M src/registry.csrc/registry.c

@@ -123,7 +123,7 @@ hex_error(ctx, "[get symbol] Failed to copy item for key: %s", key);

return 0; } *result = *item; - hex_debug_item(ctx, "DONE: ", result); + hex_debug_item(ctx, "DONE", result); return 1; } }
M src/symbols.csrc/symbols.c

@@ -48,6 +48,10 @@ HEX_FREE(ctx, value);

return 1; } + if (value->type == HEX_TYPE_QUOTATION) + { + value->operator= 0; + } if (hex_set_symbol(ctx, name->data.str_value, value, 0) != 0) { hex_error(ctx, "[symbol :] Failed to store symbol '%s'", name->data.str_value);

@@ -234,7 +238,7 @@ return 1;

} if (item->type != HEX_TYPE_QUOTATION) { - hex_error(ctx, "[symbol .] Quotation required, got %s", hex_type(item->type)); + hex_error(ctx, "[symbol .] Quotation required", hex_type(item->type)); HEX_FREE(ctx, item); return 1; }