Re-use the caught exception's error message in the parse error call.

This commit is contained in:
Chris Cowan 2015-05-14 12:27:56 -07:00
parent 74c714bce9
commit 7757c35ceb

View File

@ -484,7 +484,7 @@ function tokenizer($TEXT, filename, html5_comments) {
try {
r = new RegExp(regexp, mods);
} catch(e) {
parse_error("Invalid regular expression");
parse_error(e.message);
}
return token("regexp", r);
});