all repos — hex @ 7107e305ce51b1983a8bd7c65664d0f9af9346e1

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

Fixes.
h3rald h3rald@h3rald.com
Sat, 28 Dec 2024 17:07:24 +0100
commit

7107e305ce51b1983a8bd7c65664d0f9af9346e1

parent

5333d7a599686a665cbe5bdbcbcb27a6b3eebbec

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M src/error.csrc/error.c

@@ -75,7 +75,7 @@

if (ctx->stack_trace->size < HEX_STACK_TRACE_SIZE) { // Buffer is not full; add item - ctx->stack_trace->entries[index] = token; + ctx->stack_trace->entries[index] = hex_copy_token(ctx, token); ctx->stack_trace->size++; } else
M src/hex.hsrc/hex.h

@@ -278,6 +278,7 @@ int hex_push_quotation(hex_context_t *ctx, hex_item_t **quotation, size_t size);

int hex_push_symbol(hex_context_t *ctx, hex_token_t *token); hex_item_t *hex_pop(hex_context_t *ctx); hex_item_t *hex_copy_item(hex_context_t *ctx, const hex_item_t *item); +hex_token_t *hex_copy_token(hex_context_t *ctx, const hex_token_t *token); // Parser and interpreter hex_token_t *hex_next_token(hex_context_t *ctx, const char **input, hex_file_position_t *position);