diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | regex.c | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,13 @@ 2015-04-19 Kaz Kylheku <kaz@kylheku.com> + 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. + +2015-04-19 Kaz Kylheku <kaz@kylheku.com> + Do not allow unrecognized escapes in regex. * parser.l (REGOP): New regex alias for matching all regex @@ -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); } } |