fez-lisp 1.0.50 → 1.0.52
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +3 -3
- package/lib/baked/std.js +1 -1
- package/package.json +1 -1
- package/src/compiler.js +1 -1
- package/src/evaluator.js +43 -0
- package/src/interpreter.js +1129 -34
- package/src/parser.js +1 -1
- package/src/utils.js +2 -2
- package/src/tokeniser.js +0 -1145
- /package/src/{enums.js → keywords.js} +0 -0
package/src/parser.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { APPLY, ATOM, TYPE, WORD, VALUE } from './
|
1
|
+
import { APPLY, ATOM, TYPE, WORD, VALUE } from './keywords.js'
|
2
2
|
import { escape, preserveEscape } from './utils.js'
|
3
3
|
export const leaf = (type, value) => [type, value]
|
4
4
|
export const isLeaf = ([car]) => car === APPLY || car === ATOM || car === WORD
|
package/src/utils.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import std from '../lib/baked/std.js'
|
2
2
|
import { comp } from './compiler.js'
|
3
|
-
import { APPLY, KEYWORDS, TYPE, VALUE, WORD } from './
|
4
|
-
import { run } from './
|
3
|
+
import { APPLY, KEYWORDS, TYPE, VALUE, WORD } from './keywords.js'
|
4
|
+
import { run } from './evaluator.js'
|
5
5
|
import { AST, isLeaf, LISP } from './parser.js'
|
6
6
|
export const logError = (error) => console.log('\x1b[31m', error, '\x1b[0m')
|
7
7
|
export const logSuccess = (output) => console.log(output, '\x1b[0m')
|