fez-lisp 1.5.122 → 1.5.123
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/package.json +1 -1
- package/src/check.js +9 -1
package/package.json
CHANGED
package/src/check.js
CHANGED
@@ -299,7 +299,9 @@ const checkPredicateName = (exp, rest) => {
|
|
299
299
|
)
|
300
300
|
} else if (last[0][0] === APPLY) {
|
301
301
|
const application = last[0]
|
302
|
-
if (application[VALUE]
|
302
|
+
if (application[VALUE] === KEYWORDS.CALL_FUNCTION)
|
303
|
+
return checkPredicateName(exp, [rest[0], last.at(-1)])
|
304
|
+
else if (application[VALUE] !== KEYWORDS.IF && !IsPredicate(application))
|
303
305
|
throw new TypeError(
|
304
306
|
`Assigning predicate (ending in ?) variable (${
|
305
307
|
application[VALUE]
|
@@ -307,6 +309,12 @@ const checkPredicateName = (exp, rest) => {
|
|
307
309
|
exp
|
308
310
|
)}) (check #101)`
|
309
311
|
)
|
312
|
+
else if (application[VALUE] === KEYWORDS.IF) {
|
313
|
+
return (
|
314
|
+
checkPredicateName(exp, [rest[0], last[2]]) &&
|
315
|
+
checkPredicateName(exp, [rest[0], last[3]])
|
316
|
+
)
|
317
|
+
}
|
310
318
|
}
|
311
319
|
return true
|
312
320
|
}
|