summaryrefslogtreecommitdiffstats
path: root/lisplib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-04-23 22:35:42 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-04-23 22:35:42 -0700
commit9e9d041ee305a15cc4bcf1c34b189a6b53191d6f (patch)
tree4460f83a989fba886bb0e62f22a652db0e92849d /lisplib.c
parentec0ae5b465e8254f7cc767eb86db1c66ed3a9733 (diff)
downloadtxr-9e9d041ee305a15cc4bcf1c34b189a6b53191d6f.tar.gz
txr-9e9d041ee305a15cc4bcf1c34b189a6b53191d6f.tar.bz2
txr-9e9d041ee305a15cc4bcf1c34b189a6b53191d6f.zip
compiler: streamline destructuring error checks.
* lisplib.c (error_set_entries): Add sys:bind-mac-check to autoload list for error.tl * compiler.tl (expand-bind-mac-params): For strict mode, use the new sys:bind-mac-check function to do the check and report the error. For non-strict checks, consolidate the error check by taking advantage of n-ary nature of <= function. * error.tl (sys:bind-mac-check): New function.
Diffstat (limited to 'lisplib.c')
-rw-r--r--lisplib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisplib.c b/lisplib.c
index 1008912f..8932f2d1 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -544,7 +544,8 @@ static val pmac_instantiate(val set_fun)
static val error_set_entries(val dlt, val fun)
{
val sys_name[] = {
- lit("bind-mac-error"), lit("lambda-too-many-args"),
+ lit("bind-mac-error"), lit("bind-mac-check"),
+ lit("lambda-too-many-args"),
lit("lambda-too-few-args"), lit("lambda-short-apply-list"),
nil
};