fez-lisp 1.5.132 → 1.5.133

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/macros.js +4 -0
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.132",
5
+ "version": "1.5.133",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/macros.js CHANGED
@@ -26,6 +26,8 @@ export const SUGGAR = {
26
26
  REMAINDER_OF_DIVISION_1: '%',
27
27
  UNLESS: 'unless',
28
28
  CREATE_LIST: 'list',
29
+ CREATE_SET: 'new:set',
30
+ CREATE_MAP: 'new:map',
29
31
  POWER: '**',
30
32
  INTEGER_DEVISION: '//',
31
33
  CONDITION: 'cond'
@@ -683,6 +685,8 @@ export const seeIfProgramIsInvalid = (source) => {
683
685
  }
684
686
  export const replaceQuotes = (source) =>
685
687
  source
688
+ .replaceAll(/\(\[/g, `(${SUGGAR.CREATE_SET} [`)
689
+ .replaceAll(/\(\{/g, `(${SUGGAR.CREATE_MAP} [`)
686
690
  .replaceAll(/\[/g, `(${KEYWORDS.CREATE_ARRAY} `)
687
691
  .replaceAll(/\]/g, ')')
688
692
  .replaceAll(/\{/g, `(${SUGGAR.CREATE_LIST} `)