fez-lisp 1.0.39 → 1.0.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/parser.js +4 -2
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.0.39",
5
+ "version": "1.0.40",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/parser.js CHANGED
@@ -43,10 +43,12 @@ export const LISP = {
43
43
  if (ast == undefined) return '()'
44
44
  else if (typeof ast === 'object')
45
45
  if (Array.isArray(ast))
46
- return ast.length ? `(array ${ast.map(stringify).join(' ')})` : '()'
46
+ return ast.length
47
+ ? `(array ${ast.map(LISP.stringify).join(' ')})`
48
+ : '()'
47
49
  else
48
50
  return `(array ${ast
49
- .map(([key, value]) => `("${key}" ${stringify(value)})`)
51
+ .map(([key, value]) => `("${key}" ${LISP.stringify(value)})`)
50
52
  .join(' ')})`
51
53
  else if (typeof ast === 'string') return `"${ast}"`
52
54
  else if (typeof ast === 'function') return '()'