diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-04-19 10:59:29 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-04-19 10:59:29 -0700 |
commit | ee0f10607a276ce239ba9ee61420809b766c5715 (patch) | |
tree | 27da7b0cbf1100ff8227f2fd1a3bfc54a1acf9ee /regex.c | |
parent | e68b978b40c53b7fef21056c2d1c1dff0b6bb729 (diff) | |
download | txr-ee0f10607a276ce239ba9ee61420809b766c5715.tar.gz txr-ee0f10607a276ce239ba9ee61420809b766c5715.tar.bz2 txr-ee0f10607a276ce239ba9ee61420809b766c5715.zip |
Bugfix: throwing error when trying to print valid regexps.
* regex.c (print_rec): Only dianose "bad object in regex syntax"
for some atom other than nil, which denotes an empty (sub)expression,
like what results from #// or #/a|/ and such.
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1831,7 +1831,7 @@ static void print_rec(val exp, val stream) } else { uw_throwf(error_s, lit("bad operator in regex syntax: ~s"), sym, nao); } - } else { + } else if (exp != nil) { uw_throwf(error_s, lit("bad object in regex syntax: ~s"), exp, nao); } } |