Assert, Exit builtins

* Builtins for assert and exit are added
* Tests for assert are added
* file operations from previous MR are added to documents
* assert and exit are added to documents
This commit is contained in:
Ava Apples Affine 2023-06-20 01:25:19 +00:00
parent 270cc32572
commit 2cd5016c1d
6 changed files with 119 additions and 34 deletions

View file

@ -27,7 +27,9 @@
(def failed
'prints if a test has failed'
(test)
(echo (concat "FAILED: " test)))
(let (())
(echo (concat "FAILED: " test))
(exit 1)))
(def test-cases 'all test cases'
(('set updates var'

View file

@ -18,6 +18,20 @@
;; USERLIB
;; This file contains useful features that are not shipped in the STL
;; TODO
;; dir-path
;; abs-path
;; rel-path
;; unique (make set)
;; set add
;; set del
;; superset
;; common-set
;; make-map
;; ins-mapping
;; del-mapping
;; get-mapping
;; mapped?
;; this would be way faster as code in stl
;; but stl already suffers scope creep