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.
- package/package.json +1 -1
- package/src/parser.js +4 -2
package/package.json
CHANGED
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
|
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 '()'
|