fez-lisp 1.6.91 → 1.6.92
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/basic.html +94 -0
- package/lib/baked/basic.js +1 -0
- package/lib/baked/std-T.js +1 -1
- package/lib/baked/std.js +1 -1
- package/package.json +2 -2
- package/src/check.js +7 -0
- package/src/keywords.js +4 -1
- package/src/macros.js +1 -1
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.6.
|
5
|
+
"version": "1.6.92",
|
6
6
|
"type": "module",
|
7
7
|
"main": "index.js",
|
8
8
|
"keywords": [
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"build": "node ./lib/builder.js",
|
26
26
|
"fez": "node main.js",
|
27
27
|
"test": "mocha",
|
28
|
-
"examples": "node ./examples/leetcode/test.spec.js && node ./examples/2015/test.spec.js && node ./examples/2018/test.spec.js && node ./examples/2019/test.spec.js && node ./examples/2020/test.spec.js && node ./examples/2021/test.spec.js && node ./examples/2023/test.spec.js && node ./examples/2024/test.spec.js"
|
28
|
+
"examples": "node ./examples/leetcode/test.spec.js && node ./examples/algorithmia/test.spec.js && node ./examples/2015/test.spec.js && node ./examples/2018/test.spec.js && node ./examples/2019/test.spec.js && node ./examples/2020/test.spec.js && node ./examples/2021/test.spec.js && node ./examples/2023/test.spec.js && node ./examples/2024/test.spec.js"
|
29
29
|
},
|
30
30
|
"license": "MIT",
|
31
31
|
"devDependencies": {
|
package/src/check.js
CHANGED
@@ -2140,6 +2140,13 @@ export const typeCheck = (
|
|
2140
2140
|
const name = rest[i][0][VALUE]
|
2141
2141
|
if (!env[name]) continue
|
2142
2142
|
else if (name === KEYWORDS.IF) {
|
2143
|
+
// TODO: optimize this!!!
|
2144
|
+
// it will be extremely slow if
|
2145
|
+
// the condition is
|
2146
|
+
// 1. deeply nested
|
2147
|
+
// 2. piped with other things
|
2148
|
+
// as it will type check everything
|
2149
|
+
// for each condition exponentially
|
2143
2150
|
const concequent = [...rest]
|
2144
2151
|
const alternative = [...rest]
|
2145
2152
|
concequent[i] = rest[i][2]
|
package/src/keywords.js
CHANGED
package/src/macros.js
CHANGED
@@ -49,7 +49,7 @@ export const SUGGAR = {
|
|
49
49
|
BOOLEAN_VARIABLE: 'boolean',
|
50
50
|
BOOLEAN_VARIABLE_GET: 'boole',
|
51
51
|
BOOLEAN_VARIABLE_SET: 'boole-set',
|
52
|
-
GET_ARRAY: '
|
52
|
+
GET_ARRAY: 'get'
|
53
53
|
}
|
54
54
|
export const deSuggarAst = (ast, scope) => {
|
55
55
|
if (scope === undefined) scope = ast
|