all repos — hex @ 2c0e4cdcf9eccf6fd337d4ea127700b5cb7d3191

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

Fixes.
h3rald h3rald@h3rald.com
Mon, 23 Dec 2024 14:30:31 +0000
commit

2c0e4cdcf9eccf6fd337d4ea127700b5cb7d3191

parent

f27ecf68bbf8d888b463fe1a071e6f7e696a21ce

1 files changed, 18 insertions(+), 4 deletions(-)

jump to
M scripts/test.hexscripts/test.hex

@@ -126,7 +126,7 @@

((args len 0x2 ==) ("two") ("no") if "two" ==) ((args len 0x3 !=) ("yes") when "yes" ==) (0x1 "tmp-a" : (tmp-a 0x3 <) (tmp-a 0x1 + "tmp-a" :) while tmp-a 0x3 ==) - //(0x0 "tmp-b" : (0x1 0x2 0x3) (tmp-b + "tmp-b" :) each tmp-b 0x6 ==) + ;(0x0 "tmp-b" : (0x1 0x2 0x3) (tmp-b + "tmp-b" :) each tmp-b 0x6 ==) ;60 ((0x2 0x0 /) (error "[symbol /] Division by zero" ==) try)

@@ -136,7 +136,7 @@ ((0x1 0x2 0x3) (dup dup * *) map (0x1 0x8 0x1b) ==)

;64 (0x2 dup stack (0x2 0x2) ==) - // (clear stack () ==) + ;(clear stack () ==) (0x1 0x2 swap pop stack (0x2) ==) ;68

@@ -226,7 +226,14 @@ ) "tests" :

; --- Run tests -tests (test .) each +0x0 "_c" : +(_c tests len <) + ( + test . + _c 0x1 + "_c" : + ) +while +"_c" # ; --- Report "\nSuccessful Tests: " print successes dec print "/" print successes failures + dec puts

@@ -235,7 +242,14 @@

(errors len 0x0 >) ( "Errors:" warn - errors (warn) each + 0x0 "_c" : + (_c errors len <) + ( + warn + _c 0x1 + "_c" : + ) + while + "_c" # 0x1 "result" : ) when