Merge branch 'master' into harmony

This commit is contained in:
Richard van Velzen
2015-08-05 21:13:11 +02:00
5 changed files with 17 additions and 5 deletions

View File

@@ -480,7 +480,11 @@ function tokenizer($TEXT, filename, html5_comments) {
regexp += ch;
}
var mods = read_name();
return token("regexp", new RegExp(regexp, mods));
try {
return token("regexp", new RegExp(regexp, mods));
} catch(e) {
parse_error(e.message);
}
});
function read_operator(prefix) {