fez-lisp 1.1.53 → 1.1.55

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 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
- (|>) (mod) (let) (if) (unless) (not) (and) (or) (cond) (atom?) (lambda)
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
@@ -2,7 +2,7 @@
2
2
  "name": "fez-lisp",
3
3
  "description": "Lisp interpreted & compiled to JavaScript",
4
4
  "author": "AT290690",
5
- "version": "1.1.53",
5
+ "version": "1.1.55",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
@@ -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:
package/src/keywords.js CHANGED
@@ -9,6 +9,7 @@ export const PLACEHOLDER = '.'
9
9
  export const KEYWORDS = {
10
10
  RECURSION: 'rec',
11
11
  NUMBER_TYPE: 'number',
12
+ LIST_TYPE: 'list',
12
13
  ARRAY_TYPE: 'array',
13
14
  IDENTITY: 'identity',
14
15
  ARRAY_LENGTH: 'length',