fez-lisp 1.1.53 → 1.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/package.json +1 -1
- package/src/interpreter.js +11 -0
- package/src/keywords.js +1 -0
package/README.md
CHANGED
@@ -244,7 +244,8 @@ console.log(fez(tree(`(+ (|> 1 (+ 2) (* 3) (- 1)) (- (* (+ 1 2) 3) 1))`)))
|
|
244
244
|
```lisp
|
245
245
|
; all keywords
|
246
246
|
(/) (+) (*) (-) (=) (<) (>) (>=) (<=) (&) (~) (|) (^) (<<) (>>) (>>>)
|
247
|
-
(
|
247
|
+
(mod) (let) (if) (not) (and) (or) (cond) (atom?) (lambda)
|
248
248
|
(length) (do) (array) (set!) (get) (apply) (void)
|
249
249
|
(log!) (log-string!) (log-char!) (clear!)
|
250
|
+
(|>) (list) (unless)
|
250
251
|
```
|
package/package.json
CHANGED
package/src/interpreter.js
CHANGED
@@ -861,6 +861,17 @@ export const deSuggar = (ast) => {
|
|
861
861
|
for (let i = 0; i < inp.length; ++i) exp[i] = inp[i]
|
862
862
|
}
|
863
863
|
break
|
864
|
+
case KEYWORDS.LIST_TYPE:
|
865
|
+
{
|
866
|
+
exp.length = 0
|
867
|
+
let temp = exp
|
868
|
+
for (const item of rest) {
|
869
|
+
temp.push([0, KEYWORDS.ARRAY_TYPE], item, [])
|
870
|
+
temp = temp.at(-1)
|
871
|
+
}
|
872
|
+
temp.push([0, 'array'])
|
873
|
+
}
|
874
|
+
break
|
864
875
|
case KEYWORDS.UNLESS:
|
865
876
|
{
|
866
877
|
if (rest.length > 3 || rest.length < 2)
|