greybel-interpreter 1.8.6 → 1.8.8
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/dist/types/function.js +16 -2
- package/package.json +3 -3
package/dist/types/function.js
CHANGED
|
@@ -93,11 +93,25 @@ class CustomFunction extends base_1.CustomValue {
|
|
|
93
93
|
});
|
|
94
94
|
const argMap = new Map();
|
|
95
95
|
const isSelfNull = self instanceof nil_1.CustomNil;
|
|
96
|
+
let index = 0;
|
|
97
|
+
if (!isSelfNull) {
|
|
98
|
+
for (; index < this.argumentDefs.length; index++) {
|
|
99
|
+
const item = this.argumentDefs[index];
|
|
100
|
+
if (item.name !== exports.SELF_NAMESPACE)
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
96
104
|
let argIndex = 0;
|
|
97
|
-
for (
|
|
105
|
+
for (; index < this.argumentDefs.length; index++) {
|
|
98
106
|
const item = this.argumentDefs[index];
|
|
99
|
-
if (!isSelfNull && item.name === exports.SELF_NAMESPACE)
|
|
107
|
+
if (!isSelfNull && item.name === exports.SELF_NAMESPACE) {
|
|
108
|
+
argIndex++;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (argMap.has(item.name)) {
|
|
112
|
+
argIndex++;
|
|
100
113
|
continue;
|
|
114
|
+
}
|
|
101
115
|
argMap.set(item.name, args[argIndex++] || (yield item.defaultValue.handle(fnCtx)));
|
|
102
116
|
}
|
|
103
117
|
if (!isSelfNull) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "greybel-interpreter",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.8",
|
|
4
4
|
"description": "Interpreter",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"typescript": "^5.0.4"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"greybel-core": "^0.
|
|
52
|
-
"greyscript-core": "^0.
|
|
51
|
+
"greybel-core": "^0.7.2",
|
|
52
|
+
"greyscript-core": "^0.7.2"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"greyscript",
|