all repos — hex @ a8d4d5a215d13a184b8e6e918d60d6e8e97fbf32

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

Fixes.
h3rald h3rald@h3rald.com
Sun, 24 Nov 2024 16:08:36 +0000
commit

a8d4d5a215d13a184b8e6e918d60d6e8e97fbf32

parent

87c8c9e3b3e9c86af6e0c5615a7253ddaacc97d3

2 files changed, 9 insertions(+), 8 deletions(-)

jump to
M hex.chex.c

@@ -216,7 +216,7 @@ hex_error("Cannot overwrite native symbol %s", key);

return 1; } free(HEX_REGISTRY[i].key); - hex_free_element(HEX_REGISTRY[i].value); + //hex_free_element(HEX_REGISTRY[i].value); value.symbolName = strdup(key); HEX_REGISTRY[i].key = strdup(key); HEX_REGISTRY[i].value = value;

@@ -293,7 +293,6 @@ {

HEX_StackElement value; if (hex_get_symbol(element.symbolName, &value)) { - hex_print_element(stdout, value); result = hex_push(value); } else
M tests.hextests.hex

@@ -20,26 +20,28 @@ if

) ( ; Store error - errors test-count str " - " cat error cat q cat dup puts "errors" store + errors " - Test #" test-count str cat ": " cat error cat q cat "errors" store "x" print failures 0x1 + "failures" store - errors puts ) try ) "test" store ; --- Tests -;(0x1 "a" store a 0x1 ==) test i +(0x1 "a" store a 0x1 ==) test i (a free 0x1) test i ; --- Report "\nSuccessful Tests: " print successes dec print "/" print successes failures + dec puts -;(errors len 0x0 >) -; (errors (warn) each) -;when +(errors len 0x0 >) + ( + "Errors:" warn + errors (warn) each + ) +when ; --- Cleanup ;"a" free