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.
- package/package.json +1 -1
- package/src/macros.js +4 -0
package/package.json
CHANGED
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} `)
|