fez-lisp 1.3.23 → 1.3.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/package.json +1 -1
- package/src/macros.js +13 -0
package/package.json
CHANGED
package/src/macros.js
CHANGED
@@ -674,6 +674,19 @@ export const replaceQuotes = (source) =>
|
|
674
674
|
.replaceAll(/\'\(/g, `(${KEYWORDS.CREATE_ARRAY} `)
|
675
675
|
.replaceAll(/\`\(/g, `(${SUGGAR.CREATE_LIST} `)
|
676
676
|
.replaceAll(/\(\)/g, `(${KEYWORDS.CREATE_ARRAY})`)
|
677
|
+
.replaceAll(/\[\]/g, `(${KEYWORDS.CREATE_ARRAY})`)
|
678
|
+
.replaceAll(/\{\}/g, `(${KEYWORDS.CREATE_LIST})`)
|
679
|
+
.replaceAll(/\[/g, `(${KEYWORDS.CREATE_ARRAY} `)
|
680
|
+
.replaceAll(/\]/g, ')')
|
681
|
+
.replaceAll(/\{/g, `(${KEYWORDS.CREATE_LIST} `)
|
682
|
+
.replaceAll(/\}/g, ')')
|
683
|
+
|
684
|
+
export const replaceParens = (source) =>
|
685
|
+
source
|
686
|
+
.replaceAll(/\[/g, '(')
|
687
|
+
.replaceAll(/\]/g, ')')
|
688
|
+
.replaceAll(/\{/g, '(')
|
689
|
+
.replaceAll(/\}/g, ')')
|
677
690
|
export const deSuggarSource = (source) => replaceQuotes(replaceStrings(source))
|
678
691
|
export const handleUnbalancedQuotes = (source) => {
|
679
692
|
const diff = (source.match(/\"/g) ?? []).length % 2
|