@zenstackhq/language 3.0.0-beta.33 → 3.0.0-beta.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/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -6960,7 +6960,7 @@ var FunctionInvocationValidator = class {
|
|
|
6960
6960
|
});
|
|
6961
6961
|
return;
|
|
6962
6962
|
}
|
|
6963
|
-
if (!this.validateArgs(funcDecl, expr
|
|
6963
|
+
if (!this.validateArgs(funcDecl, expr, accept)) {
|
|
6964
6964
|
return;
|
|
6965
6965
|
}
|
|
6966
6966
|
let curr = expr.$container;
|
|
@@ -7015,18 +7015,18 @@ var FunctionInvocationValidator = class {
|
|
|
7015
7015
|
isValidationAttribute(attr) {
|
|
7016
7016
|
return !!attr.decl.ref?.attributes.some((attr2) => attr2.decl.$refText === "@@@validation");
|
|
7017
7017
|
}
|
|
7018
|
-
validateArgs(funcDecl,
|
|
7018
|
+
validateArgs(funcDecl, expr, accept) {
|
|
7019
7019
|
let success = true;
|
|
7020
7020
|
for (let i = 0; i < funcDecl.params.length; i++) {
|
|
7021
7021
|
const param = funcDecl.params[i];
|
|
7022
7022
|
if (!param) {
|
|
7023
7023
|
continue;
|
|
7024
7024
|
}
|
|
7025
|
-
const arg = args[i];
|
|
7025
|
+
const arg = expr.args[i];
|
|
7026
7026
|
if (!arg) {
|
|
7027
7027
|
if (!param.optional) {
|
|
7028
7028
|
accept("error", `missing argument for parameter "${param.name}"`, {
|
|
7029
|
-
node:
|
|
7029
|
+
node: expr
|
|
7030
7030
|
});
|
|
7031
7031
|
success = false;
|
|
7032
7032
|
}
|