all repos — hex @ ee4a227689365e39f07ef1fe4011bcc7cc7773fa

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

Updates.
h3rald h3rald@h3rald.com
Tue, 07 Jan 2025 14:11:05 +0100
commit

ee4a227689365e39f07ef1fe4011bcc7cc7773fa

parent

c62a4d2f8d57fade17ee22a0cf36ec66e8ce3ddb

5 files changed, 28 insertions(+), 7 deletions(-)

jump to
M CHANGELOG.mdCHANGELOG.md

@@ -1,10 +1,21 @@

<article> <h2>Changelog</h2> <ul> +<li><a href="#v0.4.1">v0.4.1</a></li> <li><a href="#v0.4.0">v0.4.0</a></li> <li><a href="#v0.3.0">v0.3.0</a></li> <li><a href="#v0.2.0">v0.2.0</a></li> <li><a href="#v0.1.0">v0.1.0</a></li> +</ul> +<h3 id="v0.4.1">v0.4.1 &mdash; 2025-01-07</h3> + +<h4>Fixes</h4> +<ul> + <li>Addressed segmentation fault when interpreting bytecode on Windows (filename was not populated for symbol + position).</li> + <li>Ensured that newlines are correctly processed on Windows.</li> + <li>Renamed the <code>operator</code> property in <code>hex_item_t</code> to <code>is_operator</code> to avoid + conflicts in C++ code (operator is a reserved keyword).</li> </ul> <h3 id="v0.4.0">v0.4.0 &mdash; 2025-01-03</h3>
A releases/0.4.1.html

@@ -0,0 +1,10 @@

+<h3 id="v0.4.1">v0.4.1 &mdash; 2025-01-07</h3> + +<h4>Fixes</h4> +<ul> + <li>Addressed segmentation fault when interpreting bytecode on Windows (filename was not populated for symbol + position).</li> + <li>Ensured that newlines are correctly processed on Windows.</li> + <li>Renamed the <code>operator</code> property in <code>hex_item_t</code> to <code>is_operator</code> to avoid + conflicts in C++ code (operator is a reserved keyword).</li> +</ul>
M src/hex.hsrc/hex.h

@@ -20,7 +20,7 @@ #include <sys/wait.h>

#endif // Constants -#define HEX_VERSION "0.4.0" +#define HEX_VERSION "0.4.1" #define HEX_STDIN_BUFFER_SIZE 16384 #define HEX_INITIAL_REGISTRY_SIZE 512 #define HEX_REGISTRY_SIZE 4096

@@ -79,7 +79,7 @@ char *str_value;

int (*fn_value)(hex_context_t *); struct hex_item_t **quotation_value; } data; - int operator; + int is_operator; hex_token_t *token; // Token containing stack information (valid for HEX_TYPE_NATIVE_SYMBOL and HEX_TYPE_USER_SYMBOL) size_t quotation_size; // Size of the quotation (valid for HEX_TYPE_QUOTATION) } hex_item_t;
M src/stack.csrc/stack.c

@@ -36,7 +36,7 @@ return 1;

} if (hex_get_symbol(ctx, item->token->value, value)) { - if (value->type == HEX_TYPE_QUOTATION && value->operator) + if (value->type == HEX_TYPE_QUOTATION && value->is_operator) { add_to_stack_trace(ctx, item->token); for (size_t i = 0; i < value->quotation_size; i++)

@@ -139,7 +139,7 @@ {

hex_error(ctx, "[create quotation] Failed to allocate memory for item"); return NULL; } - item->operator= 0; + item->is_operator = 0; item->type = HEX_TYPE_QUOTATION; item->data.quotation_value = quotation; item->quotation_size = size;

@@ -397,7 +397,7 @@ }

// Copy basic fields copy->type = item->type; - copy->operator= item->operator; + copy->is_operator = item->is_operator; copy->quotation_size = item->quotation_size; // Copy the union field based on the type
M src/symbols.csrc/symbols.c

@@ -35,7 +35,7 @@ }

if (value->type == HEX_TYPE_QUOTATION) { - value->operator= 0; + value->is_operator = 0; } if (hex_set_symbol(ctx, name->data.str_value, value, 0) != 0) {

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

if (value->type == HEX_TYPE_QUOTATION) { - value->operator= 1; + value->is_operator = 1; } if (hex_set_symbol(ctx, name->data.str_value, value, 0) != 0)