fez-lisp 1.6.22 → 1.6.24

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/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.6.22",
5
+ "version": "1.6.24",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/macros.js CHANGED
@@ -37,7 +37,9 @@ export const SUGGAR = {
37
37
  BIG_INT_DIVISION: 'Idiv',
38
38
  BIG_INT_MULTIPLICATION: 'Imul',
39
39
  NEW_BIG_INTEGER: 'new:big-integer',
40
- PROMISES: '*DATA*'
40
+ PROMISES: '*DATA*',
41
+ VARIABLE: 'variable',
42
+ SET_VARIABLE: 'set'
41
43
  }
42
44
  export const deSuggarAst = (ast, scope) => {
43
45
  if (scope === undefined) scope = ast
@@ -98,6 +100,23 @@ export const deSuggarAst = (ast, scope) => {
98
100
  // }
99
101
  // }
100
102
  // break
103
+ case KEYWORDS.GET_ARRAY:
104
+ if (rest.length === 1) {
105
+ exp.push([ATOM, 0])
106
+ }
107
+ break
108
+ case SUGGAR.VARIABLE:
109
+ {
110
+ exp[0][VALUE] = 'let'
111
+ const temp = exp.pop()
112
+ exp.push([[APPLY, 'var:def'], temp])
113
+ }
114
+ deSuggarAst(exp.at(-1))
115
+ break
116
+ case SUGGAR.SET_VARIABLE:
117
+ exp[0][VALUE] = 'var:set!'
118
+ deSuggarAst(exp.at(-1))
119
+ break
101
120
  case KEYWORDS.BLOCK:
102
121
  {
103
122
  if (rest.length === 0)