fez-lisp 1.1.53 → 1.1.55
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -1
- package/package.json +1 -1
- package/src/interpreter.js +13 -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
@@ -859,6 +859,19 @@ export const deSuggar = (ast) => {
|
|
859
859
|
inp = [rest[i].shift(), inp, ...rest[i]]
|
860
860
|
}
|
861
861
|
for (let i = 0; i < inp.length; ++i) exp[i] = inp[i]
|
862
|
+
deSuggar(exp)
|
863
|
+
}
|
864
|
+
break
|
865
|
+
case KEYWORDS.LIST_TYPE:
|
866
|
+
{
|
867
|
+
exp.length = 0
|
868
|
+
let temp = exp
|
869
|
+
for (const item of rest) {
|
870
|
+
temp.push([0, KEYWORDS.ARRAY_TYPE], item, [])
|
871
|
+
temp = temp.at(-1)
|
872
|
+
}
|
873
|
+
temp.push([0, 'array'])
|
874
|
+
deSuggar(exp)
|
862
875
|
}
|
863
876
|
break
|
864
877
|
case KEYWORDS.UNLESS:
|