@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.js
CHANGED
|
@@ -6924,7 +6924,7 @@ var FunctionInvocationValidator = class {
|
|
|
6924
6924
|
});
|
|
6925
6925
|
return;
|
|
6926
6926
|
}
|
|
6927
|
-
if (!this.validateArgs(funcDecl, expr
|
|
6927
|
+
if (!this.validateArgs(funcDecl, expr, accept)) {
|
|
6928
6928
|
return;
|
|
6929
6929
|
}
|
|
6930
6930
|
let curr = expr.$container;
|
|
@@ -6979,18 +6979,18 @@ var FunctionInvocationValidator = class {
|
|
|
6979
6979
|
isValidationAttribute(attr) {
|
|
6980
6980
|
return !!attr.decl.ref?.attributes.some((attr2) => attr2.decl.$refText === "@@@validation");
|
|
6981
6981
|
}
|
|
6982
|
-
validateArgs(funcDecl,
|
|
6982
|
+
validateArgs(funcDecl, expr, accept) {
|
|
6983
6983
|
let success = true;
|
|
6984
6984
|
for (let i = 0; i < funcDecl.params.length; i++) {
|
|
6985
6985
|
const param = funcDecl.params[i];
|
|
6986
6986
|
if (!param) {
|
|
6987
6987
|
continue;
|
|
6988
6988
|
}
|
|
6989
|
-
const arg = args[i];
|
|
6989
|
+
const arg = expr.args[i];
|
|
6990
6990
|
if (!arg) {
|
|
6991
6991
|
if (!param.optional) {
|
|
6992
6992
|
accept("error", `missing argument for parameter "${param.name}"`, {
|
|
6993
|
-
node:
|
|
6993
|
+
node: expr
|
|
6994
6994
|
});
|
|
6995
6995
|
success = false;
|
|
6996
6996
|
}
|