@thi.ng/pointfree-lang 2.3.49 → 2.3.51
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 -1
- package/package.json +9 -9
- package/runtime.js +6 -6
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 211 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/pointfree-lang",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.51",
|
|
4
4
|
"description": "Forth style syntax layer/compiler & CLI for the @thi.ng/pointfree DSL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@thi.ng/api": "^8.12.
|
|
47
|
-
"@thi.ng/args": "^3.2.
|
|
48
|
-
"@thi.ng/bench": "^3.6.
|
|
49
|
-
"@thi.ng/errors": "^2.5.
|
|
50
|
-
"@thi.ng/file-io": "^2.2.
|
|
51
|
-
"@thi.ng/logger": "^3.2.
|
|
52
|
-
"@thi.ng/pointfree": "^3.1.
|
|
46
|
+
"@thi.ng/api": "^8.12.10",
|
|
47
|
+
"@thi.ng/args": "^3.2.5",
|
|
48
|
+
"@thi.ng/bench": "^3.6.37",
|
|
49
|
+
"@thi.ng/errors": "^2.5.50",
|
|
50
|
+
"@thi.ng/file-io": "^2.2.20",
|
|
51
|
+
"@thi.ng/logger": "^3.2.9",
|
|
52
|
+
"@thi.ng/pointfree": "^3.1.130"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^24.10.1",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"parent": "@thi.ng/pointfree",
|
|
112
112
|
"year": 2018
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
|
|
115
115
|
}
|
package/runtime.js
CHANGED
|
@@ -42,14 +42,14 @@ const __resolveNode = (node, ctx) => {
|
|
|
42
42
|
};
|
|
43
43
|
const __resolveArray = (node, ctx) => {
|
|
44
44
|
const res = [];
|
|
45
|
-
for (
|
|
45
|
+
for (const n of node.body) {
|
|
46
46
|
res.push(__resolveNode(n, ctx));
|
|
47
47
|
}
|
|
48
48
|
return res;
|
|
49
49
|
};
|
|
50
50
|
const __resolveObject = (node, ctx) => {
|
|
51
51
|
const res = {};
|
|
52
|
-
for (
|
|
52
|
+
for (const [k, v] of node.body) {
|
|
53
53
|
res[k.type === "sym" ? k.id : __resolveNode(k, ctx)] = __resolveNode(
|
|
54
54
|
v,
|
|
55
55
|
ctx
|
|
@@ -152,7 +152,7 @@ const __visitWord = (node, ctx, state) => {
|
|
|
152
152
|
state.word = { name: id, loc: node.loc };
|
|
153
153
|
const locals = node.locals;
|
|
154
154
|
__pushLocals(__beginvar, wctx, locals);
|
|
155
|
-
for (
|
|
155
|
+
for (const n of node.body) {
|
|
156
156
|
wctx = __visit(n, wctx, state);
|
|
157
157
|
}
|
|
158
158
|
__pushLocals(__endvar, wctx, locals);
|
|
@@ -189,7 +189,7 @@ const __ensureEnv = (env) => {
|
|
|
189
189
|
env.__vars = {};
|
|
190
190
|
}
|
|
191
191
|
const vars = env.__vars;
|
|
192
|
-
for (
|
|
192
|
+
for (const k in env) {
|
|
193
193
|
if (k !== "__words" && k !== "__vars") {
|
|
194
194
|
vars[k] = [env[k]];
|
|
195
195
|
}
|
|
@@ -200,7 +200,7 @@ const __finalizeEnv = (ctx) => {
|
|
|
200
200
|
const env = ctx[2];
|
|
201
201
|
const vars = env.__vars;
|
|
202
202
|
delete env.__vars;
|
|
203
|
-
for (
|
|
203
|
+
for (const k in vars) {
|
|
204
204
|
const v = vars[k];
|
|
205
205
|
if (v.length !== 1) {
|
|
206
206
|
illegalState(`dangling or missing scopes for var: ${k}`);
|
|
@@ -213,7 +213,7 @@ const run = (src, env, stack = []) => {
|
|
|
213
213
|
let ctx = pf.ctx(stack, __ensureEnv(env));
|
|
214
214
|
const state = {};
|
|
215
215
|
try {
|
|
216
|
-
for (
|
|
216
|
+
for (const node of parse(src)) {
|
|
217
217
|
ctx = __visit(node, ctx, state);
|
|
218
218
|
}
|
|
219
219
|
return __finalizeEnv(ctx);
|