all repos — hex @ e0423b52d66a937b12ffc21df462ad5a8148a4c4

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

Fixes.
h3rald h3rald@h3rald.com
Sat, 23 Nov 2024 15:45:35 +0100
commit

e0423b52d66a937b12ffc21df462ad5a8148a4c4

parent

620381a08d8df3b1522741dc696052cb16630940

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

jump to
M hex.chex.c

@@ -784,9 +784,13 @@ free(quotation);

return 1; } } + else if (token->type == HEX_TOKEN_COMMENT) + { + // Ignore comments + } else { - hex_error("Unexpected token in quotation"); + hex_error("Unexpected token in quotation: >>%s<<", token->value); hex_free_token(token); free(quotation); return 1;

@@ -3561,7 +3565,7 @@ }

token = hex_next_token(&input, &line, &column); } - if (token->type == HEX_TOKEN_INVALID) + if (token != NULL && token->type == HEX_TOKEN_INVALID) { token->filename = strdup(filename); add_to_stack_trace(token);