diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-04-23 22:35:42 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-04-23 22:35:42 -0700 |
commit | 9e9d041ee305a15cc4bcf1c34b189a6b53191d6f (patch) | |
tree | 4460f83a989fba886bb0e62f22a652db0e92849d /lisplib.c | |
parent | ec0ae5b465e8254f7cc767eb86db1c66ed3a9733 (diff) | |
download | txr-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 }; |