fez-lisp 1.5.29 → 1.5.30
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 +19 -13
package/package.json
CHANGED
package/src/check.js
CHANGED
@@ -390,7 +390,7 @@ export const typeCheck = (ast) => {
|
|
390
390
|
if (env[first[VALUE]] === undefined) {
|
391
391
|
errorStack.set(
|
392
392
|
key,
|
393
|
-
`Trying to access undefined variable ${first[VALUE]}`
|
393
|
+
`Trying to access undefined variable ${first[VALUE]} (check #11)`
|
394
394
|
)
|
395
395
|
}
|
396
396
|
// else if (errorStack.has(key)) errorStack.delete(key)
|
@@ -457,7 +457,7 @@ export const typeCheck = (ast) => {
|
|
457
457
|
first[VALUE]
|
458
458
|
}). Expected at least 1 (the lambda body) but got 1 (${stringifyArgs(
|
459
459
|
exp
|
460
|
-
)})`
|
460
|
+
)}) (check #10)`
|
461
461
|
)
|
462
462
|
}
|
463
463
|
const params = exp.slice(1, -1)
|
@@ -483,7 +483,7 @@ export const typeCheck = (ast) => {
|
|
483
483
|
if (env[first[VALUE]] === undefined)
|
484
484
|
errorStack.set(
|
485
485
|
key,
|
486
|
-
`Trying to call undefined (lambda) ${first[VALUE]}`
|
486
|
+
`Trying to call undefined (lambda) ${first[VALUE]} (check #9)`
|
487
487
|
)
|
488
488
|
else if (
|
489
489
|
env[first[VALUE]][STATS].type === APPLY &&
|
@@ -496,7 +496,9 @@ export const typeCheck = (ast) => {
|
|
496
496
|
first[VALUE]
|
497
497
|
}). Expected (= ${
|
498
498
|
env[first[VALUE]][STATS][ARGS_COUNT]
|
499
|
-
}) but got ${rest.length} (${stringifyArgs(
|
499
|
+
}) but got ${rest.length} (${stringifyArgs(
|
500
|
+
exp
|
501
|
+
)}) (check #8)`
|
500
502
|
)
|
501
503
|
} else {
|
502
504
|
const isSpecial = SPECIAL_FORMS_SET.has(first[VALUE])
|
@@ -538,7 +540,9 @@ export const typeCheck = (ast) => {
|
|
538
540
|
first[VALUE]
|
539
541
|
}). Expected (= ${
|
540
542
|
args[i][STATS][ARGS_COUNT]
|
541
|
-
}) but got ${rest.length} (${stringifyArgs(
|
543
|
+
}) but got ${rest.length} (${stringifyArgs(
|
544
|
+
exp
|
545
|
+
)}) (check #7)`
|
542
546
|
)
|
543
547
|
}
|
544
548
|
} else if (
|
@@ -555,7 +559,9 @@ export const typeCheck = (ast) => {
|
|
555
559
|
first[VALUE]
|
556
560
|
}). Expected (= ${
|
557
561
|
args[i][STATS][ARGS_COUNT]
|
558
|
-
}) but got ${rest.length} (${stringifyArgs(
|
562
|
+
}) but got ${rest.length} (${stringifyArgs(
|
563
|
+
exp
|
564
|
+
)}) (check #6)`
|
559
565
|
)
|
560
566
|
}
|
561
567
|
|
@@ -585,7 +591,7 @@ export const typeCheck = (ast) => {
|
|
585
591
|
expectedArgs[i][TYPE]
|
586
592
|
)}) but got (${toTypeNames(
|
587
593
|
env[CAR][STATS][RETURNS]
|
588
|
-
)}) (${stringifyArgs(exp)})`
|
594
|
+
)}) (${stringifyArgs(exp)}) (check #1)`
|
589
595
|
)
|
590
596
|
}
|
591
597
|
// else {
|
@@ -613,13 +619,13 @@ export const typeCheck = (ast) => {
|
|
613
619
|
)
|
614
620
|
errorStack.set(
|
615
621
|
key,
|
616
|
-
`Incorrect type of arguments for (${
|
622
|
+
`Incorrect type of arguments for special form (${
|
617
623
|
first[VALUE]
|
618
624
|
}). Expected (${toTypeNames(
|
619
625
|
expectedArgs[i][TYPE]
|
620
626
|
)}) but got (${toTypeNames(
|
621
627
|
rest[i][TYPE]
|
622
|
-
)}) (${stringifyArgs(exp)})`
|
628
|
+
)}) (${stringifyArgs(exp)}) (check #2)`
|
623
629
|
)
|
624
630
|
} else if (
|
625
631
|
T !== UNKNOWN &&
|
@@ -628,13 +634,13 @@ export const typeCheck = (ast) => {
|
|
628
634
|
) {
|
629
635
|
errorStack.set(
|
630
636
|
key,
|
631
|
-
`Incorrect type of arguments for (${
|
637
|
+
`Incorrect type of arguments for special form (${
|
632
638
|
first[VALUE]
|
633
639
|
}). Expected (${toTypeNames(
|
634
640
|
expectedArgs[i][TYPE]
|
635
641
|
)}) but got (${toTypeNames(
|
636
|
-
|
637
|
-
)}) (${stringifyArgs(exp)})`
|
642
|
+
T
|
643
|
+
)}) (${stringifyArgs(exp)}) (check #3)`
|
638
644
|
)
|
639
645
|
} else {
|
640
646
|
env[rest[i][VALUE]][STATS].type =
|
@@ -651,7 +657,7 @@ export const typeCheck = (ast) => {
|
|
651
657
|
expectedArgs[i][TYPE]
|
652
658
|
)}) but got (${toTypeNames(
|
653
659
|
rest[i][TYPE]
|
654
|
-
)}) (${stringifyArgs(exp)})`
|
660
|
+
)}) (${stringifyArgs(exp)}) (check #5)`
|
655
661
|
)
|
656
662
|
break
|
657
663
|
}
|