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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/check.js +9 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "fez-lisp",
3
3
  "description": "Lisp interpreted & compiled to JavaScript",
4
4
  "author": "AT290690",
5
- "version": "1.5.122",
5
+ "version": "1.5.123",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
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] !== KEYWORDS.IF && !IsPredicate(application))
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
  }