fez-lisp 1.5.177 → 1.5.179

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.177",
5
+ "version": "1.5.179",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/macros.js CHANGED
@@ -21,6 +21,7 @@ import { NIL } from './types.js'
21
21
  export const SUGGAR = {
22
22
  // Syntactic suggars
23
23
  PIPE: '|>',
24
+ STR_LIST: '~~',
24
25
  NOT_EQUAL_1: '!=',
25
26
  NOT_EQUAL_2: '<>',
26
27
  REMAINDER_OF_DIVISION_1: '%',
@@ -187,6 +188,15 @@ export const deSuggarAst = (ast, scope) => {
187
188
  deSuggarAst(exp, scope)
188
189
  }
189
190
  break
191
+ case SUGGAR.STR_LIST:
192
+ {
193
+ const items = rest[0].slice(1)
194
+ exp.length = 0
195
+ exp.push([APPLY, SUGGAR.CREATE_LIST])
196
+ exp.push(...items)
197
+ deSuggarAst(exp, scope)
198
+ }
199
+ break
190
200
  case SUGGAR.CREATE_LIST:
191
201
  {
192
202
  exp.length = 0
@@ -688,6 +698,7 @@ export const seeIfProgramIsInvalid = (source) => {
688
698
  }
689
699
  export const replaceQuotes = (source) =>
690
700
  source
701
+ .replaceAll(/\(\(array /g, `(${SUGGAR.STR_LIST} (array `)
691
702
  .replaceAll(/\(\[/g, `(${SUGGAR.CREATE_SET} [`)
692
703
  .replaceAll(/\(\{/g, `(${SUGGAR.CREATE_MAP} [`)
693
704
  .replaceAll(/\[/g, `(${KEYWORDS.CREATE_ARRAY} `)