Handle backslashes at the end of regexps

pull/70/head
Max Brunsfeld 2014-09-06 20:37:46 +07:00
parent 3832b2dfca
commit a0a97b7433
2 changed files with 2 additions and 2 deletions

@ -277,7 +277,7 @@ module.exports = compiler.grammar
seq("/*", repeat(choice(/[^\*]/, /\*[^/]/)), "*/")))
regex: -> token(seq(
'/', repeat(choice(/[^/\n]/, '\\/')), '/',
'/', repeat(choice(/[^\\/\n]/, /\\./)), '/',
repeat(choice('i', 'g'))))
true: -> keyword("true")

@ -62,7 +62,7 @@ false;
Regexps
============================================
/one/;
/one\\/;
/one/g;
/one/i;
/one/gi;