fez-lisp 1.5.191 → 1.5.192

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.5.191",
5
+ "version": "1.5.192",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/macros.js CHANGED
@@ -11,7 +11,6 @@ import {
11
11
  KEYWORDS,
12
12
  PLACEHOLDER,
13
13
  STATIC_TYPES,
14
- TRUE,
15
14
  TYPE,
16
15
  VALUE,
17
16
  WORD
@@ -308,11 +307,12 @@ export const deSuggarAst = (ast, scope) => {
308
307
  case KEYWORDS.SUBTRACTION:
309
308
  if (rest.length > 2) {
310
309
  exp.length = 0
310
+ rest.reverse()
311
311
  let temp = exp
312
312
  for (let i = 0; i < rest.length; i += 1) {
313
313
  if (i < rest.length - 1) {
314
- temp.push([APPLY, KEYWORDS.SUBTRACTION], rest[i], [])
315
- temp = temp.at(-1)
314
+ temp.push([APPLY, KEYWORDS.SUBTRACTION], [], rest[i])
315
+ temp = temp.at(-2)
316
316
  } else temp.push(...rest[i])
317
317
  }
318
318
  deSuggarAst(exp, scope)
@@ -345,11 +345,12 @@ export const deSuggarAst = (ast, scope) => {
345
345
  exp.push([ATOM, 1], rest[0])
346
346
  } else if (rest.length > 2) {
347
347
  exp.length = 0
348
+ rest.reverse()
348
349
  let temp = exp
349
350
  for (let i = 0; i < rest.length; i += 1) {
350
351
  if (i < rest.length - 1) {
351
- temp.push([APPLY, KEYWORDS.DIVISION], rest[i], [])
352
- temp = temp.at(-1)
352
+ temp.push([APPLY, KEYWORDS.DIVISION], [], rest[i])
353
+ temp = temp.at(-2)
353
354
  } else temp.push(...rest[i])
354
355
  }
355
356
  deSuggarAst(exp, scope)