diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-02-27 17:58:37 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-02-27 17:58:37 -0800 |
commit | 3ade8d5cc4514df520edd4f95817b445e35fff41 (patch) | |
tree | 5d25ab5d84b84f1b88de7a176c7928f31851a119 | |
parent | f240f80051a409043ee7717b5f995f75832a8f78 (diff) | |
download | txr-3ade8d5cc4514df520edd4f95817b445e35fff41.tar.gz txr-3ade8d5cc4514df520edd4f95817b445e35fff41.tar.bz2 txr-3ade8d5cc4514df520edd4f95817b445e35fff41.zip |
txr: bugfix, allow lazy lists in multi match.
* match.c (do_match_line): Handle LCONS the same way as CONS.
When a variable occurs whose value is a list of strings,
that may be a lazy list. I ran into a problem using @(data x)
to capture a list of strings, and then matching that with @x;
the error being "unsupported object in spec", caused by the
list's LCONS type not handled in this switch.
-rw-r--r-- | match.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1752,6 +1752,7 @@ static val do_match_line(match_line_ctx *c) switch (type(elem)) { case CONS: /* directive */ + case LCONS: { val directive = first(elem); |