fez-lisp 1.5.6 → 1.5.7

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.6",
5
+ "version": "1.5.7",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/keywords.js CHANGED
@@ -53,9 +53,12 @@ export const RUNTIME_TYPES = {
53
53
  ARRAY: 'array'
54
54
  }
55
55
  export const DEBUG = {
56
+ STRING: 'string',
56
57
  LOG: 'log',
57
58
  ASSERT: 'assert',
58
59
  SIGNATURE: '?',
60
+ LIST_THEMES: 'theme?',
61
+ SET_THEME: 'theme!',
59
62
  CALLSTACK: '(CALLSTACK)' // so that you can't use it in the code
60
63
  }
61
64
 
package/src/utils.js CHANGED
@@ -11,6 +11,12 @@ import {
11
11
  export const logError = (error) =>
12
12
  console.log('\x1b[31m', `\n${error}\n`, '\x1b[0m')
13
13
  export const logSuccess = (output) => console.log('\x1b[32m', output, '\x1b[0m')
14
+ export const formatErrorWithCallstack = (error, callstack) => {
15
+ return `${error.message}\n${callstack
16
+ .reverse()
17
+ .map((x, i) => `${Array(i + 2).join(' ')}(${x} ...)`)
18
+ .join('\n')}`
19
+ }
14
20
  export const removeNoCode = (source) =>
15
21
  source
16
22
  .replace(/;.+/g, '')
@@ -263,3 +269,15 @@ export const parse = (source) =>
263
269
  std
264
270
  )
265
271
  )
272
+
273
+ export const UTILS = {
274
+ handleUnbalancedQuotes,
275
+ handleUnbalancedParens,
276
+ logError,
277
+ logSuccess,
278
+ formatErrorWithCallstack,
279
+ wrapInBlock,
280
+ isEqual,
281
+ stringifyArgs,
282
+ shake
283
+ }