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/README.md +14 -15
- package/lib/baked/std-T.js +1 -1
- package/lib/baked/std.js +1 -1
- package/package.json +1 -1
- package/src/macros.js +20 -1
package/package.json
CHANGED
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)
|