fez-lisp 1.2.32 → 1.2.34
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/README.md +1 -5
- package/lib/baked/std.js +1 -1
- package/package.json +1 -1
- package/src/compiler.js +0 -6
- package/src/interpreter.js +1 -13
- package/src/keywords.js +0 -1
- package/src/utils.js +1 -1
package/package.json
CHANGED
package/src/compiler.js
CHANGED
@@ -292,12 +292,6 @@ const compile = (tree, Drill) => {
|
|
292
292
|
out += '0);'
|
293
293
|
return out
|
294
294
|
}
|
295
|
-
// case KEYWORDS.PIPE: {
|
296
|
-
// let inp = Arguments[0]
|
297
|
-
// for (let i = 1; i < Arguments.length; ++i)
|
298
|
-
// inp = [Arguments[i].shift(), inp, ...Arguments[i]]
|
299
|
-
// return compile(inp, Drill)
|
300
|
-
// }
|
301
295
|
default: {
|
302
296
|
const camelCased = lispToJavaScriptVariableName(token)
|
303
297
|
if (camelCased in Helpers) Drill.Helpers.add(camelCased)
|
package/src/interpreter.js
CHANGED
@@ -1,16 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
TYPE,
|
3
|
-
VALUE,
|
4
|
-
WORD,
|
5
|
-
KEYWORDS,
|
6
|
-
APPLY,
|
7
|
-
ATOM,
|
8
|
-
FALSE,
|
9
|
-
TRUE,
|
10
|
-
TYPES
|
11
|
-
} from './keywords.js'
|
1
|
+
import { TYPE, VALUE, WORD, KEYWORDS, FALSE, TRUE, TYPES } from './keywords.js'
|
12
2
|
import { evaluate } from './evaluator.js'
|
13
|
-
import { isLeaf } from './parser.js'
|
14
3
|
import { isForbiddenVariableName, stringifyArgs } from './utils.js'
|
15
4
|
const keywords = {
|
16
5
|
[KEYWORDS.REMAINDER_OF_DIVISION]: (args, env) => {
|
@@ -797,6 +786,5 @@ const keywords = {
|
|
797
786
|
return 0
|
798
787
|
}
|
799
788
|
}
|
800
|
-
keywords[KEYWORDS.NOT_COMPILED_BLOCK] = keywords[KEYWORDS.BLOCK]
|
801
789
|
|
802
790
|
export { keywords }
|
package/src/keywords.js
CHANGED
package/src/utils.js
CHANGED
@@ -70,7 +70,7 @@ export const stringifyArrayTypes = (type) =>
|
|
70
70
|
: 'number'
|
71
71
|
export const stringifyType = (type) => {
|
72
72
|
if (!isLeaf(type)) {
|
73
|
-
const [car
|
73
|
+
const [car] = type
|
74
74
|
if (car == undefined) return '(array)'
|
75
75
|
else if (car[TYPE] === APPLY && car[VALUE] === KEYWORDS.ARRAY_TYPE)
|
76
76
|
return `(array ${type
|