fez-lisp 1.5.132 → 1.5.134
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/lib/baked/std.js +1 -1
- package/package.json +1 -1
- package/src/macros.js +4 -0
- package/src/types.js +2 -2
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} `)
|
package/src/types.js
CHANGED
@@ -1222,8 +1222,8 @@ export const formatSubType = (T) => {
|
|
1222
1222
|
? formatSubType([x])
|
1223
1223
|
: toTypeNamesAnyToUknown(x)
|
1224
1224
|
)
|
1225
|
-
.join(' ')
|
1226
|
-
:
|
1225
|
+
.join(' ') || toTypeNames(UNKNOWN)
|
1226
|
+
: toTypeNames(UNKNOWN)
|
1227
1227
|
}]`
|
1228
1228
|
case ATOM:
|
1229
1229
|
return `${
|