fez-lisp 1.2.42 → 1.2.43

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.2.42",
5
+ "version": "1.2.43",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
@@ -1,7 +1,7 @@
1
1
  import { TYPE, VALUE, WORD, KEYWORDS, FALSE, TRUE, TYPES } from './keywords.js'
2
2
  import { evaluate } from './evaluator.js'
3
3
  import { isForbiddenVariableName, stringifyArgs } from './utils.js'
4
- const keywords = {
4
+ export const keywords = {
5
5
  [KEYWORDS.REMAINDER_OF_DIVISION]: (args, env) => {
6
6
  if (args.length < 2)
7
7
  throw new RangeError(
@@ -819,6 +819,4 @@ const keywords = {
819
819
  )
820
820
  throw new Error(expression.map((x) => String.fromCharCode(x)).join(''))
821
821
  }
822
- }
823
-
824
- export { keywords }
822
+ }
package/src/utils.js CHANGED
@@ -315,7 +315,7 @@ export const minify = (source) =>
315
315
  deSuggar(LISP.parse(replaceQuotes(replaceStrings(removeNoCode(source)))))
316
316
  )
317
317
  export const prep = (source) =>
318
- deSuggar(LISP.parse(replaceQuotes(replaceStrings(removeNoCode(source)))))
318
+ deSuggar(LISP.parse(removeNoCode(replaceQuotes(replaceStrings(source)))))
319
319
  export const src = (source, deps) => {
320
320
  source = prep(source)
321
321
  return LISP.source([
@@ -336,6 +336,10 @@ export const ast = (source, deps) => {
336
336
  ...source
337
337
  ]
338
338
  }
339
+ export const astWithStd = (source) => {
340
+ const parsed = prep(source)
341
+ return [...treeShake(parsed, std), ...parsed]
342
+ }
339
343
  export const dependencies = (source, deps) => {
340
344
  source = prep(source)
341
345
  return shakedList(