Remove cleanup symbol from utils and update test for symbols length
h3rald h3rald@h3rald.com
Mon, 07 Apr 2025 10:41:19 +0200
2 files changed,
1 insertions(+),
22 deletions(-)
M
lib/utils.hex
→
lib/utils.hex
@@ -105,26 +105,6 @@ "_ends_c" #
"_ends_offset" # ) "ends" :: -;;; cleanup -;; s -> -;; Frees all symbols starting with %:s%%. -( - "_cleanup_prefix" : - 0x0 "_cleanup_c" : - (_cleanup_c symbols len <) - ( - symbols _cleanup_c get "_cleanup_item" : - (_cleanup_item _cleanup_prefix begins) - (_cleanup_item #) - when - _cleanup_c 0x1 + "_cleanup_c" : - ) - while - "_cleanup_prefix" # - "_cleanup_item" # - "_cleanup_c" # -) "cleanup" :: - ;; insert ;; q1 a i -> q2 ;; Inserts item %:a%% at position %:i%% within a quotation.@@ -293,7 +273,6 @@ _intpl_s "$" _intpl_c str cat _intpl_list _intpl_c get cat gsub "_intpl_s" :
_intpl_c 0x1 + "_intpl_c" : ) while - "_intpl_" cleanup "_intpl_s" # "_intpl_q" # "_intpl_c" #
M
scripts/test.hex
→
scripts/test.hex
@@ -130,7 +130,7 @@
((args len 0x2 ==) ("two") ("no") if "two" ==) ((dup *) "square" :: 0x2 square 0x4 == "square" #) (0x1 "tmp-a" : (tmp-a 0x3 <) (tmp-a 0x1 + "tmp-a" :) while tmp-a 0x3 ==) - (symbols len 0x5e ==) + (symbols len 0x5d ==) ;60 ((0x2 0x0 /) (error "[symbol /] Division by zero" ==) try)