allowing a regex literal to be the last token in a file ... Lexer bug.

This commit is contained in:
Jeremy Ashkenas 2010-06-13 00:56:42 -04:00
parent b61399fbde
commit 88ea66b4c9
2 changed files with 2 additions and 2 deletions

View File

@ -682,7 +682,7 @@
// Regex-matching-regexes.
REGEX_START = /^\/[^\/ ]/;
REGEX_INTERPOLATION = /([^\\]\$[a-zA-Z_@]|[^\\]\$\{.*[^\\]\})/;
REGEX_END = /^(([imgy]{1,4})\b|\W)/;
REGEX_END = /^(([imgy]{1,4})\b|\W|$)/;
REGEX_ESCAPE = /\\[^\$]/g;
// Token cleaning regexes.
JS_CLEANER = /(^`|`$)/g;

View File

@ -500,7 +500,7 @@ ASSIGNMENT : /^[:=]$/
# Regex-matching-regexes.
REGEX_START : /^\/[^\/ ]/
REGEX_INTERPOLATION: /([^\\]\$[a-zA-Z_@]|[^\\]\$\{.*[^\\]\})/
REGEX_END : /^(([imgy]{1,4})\b|\W)/
REGEX_END : /^(([imgy]{1,4})\b|\W|$)/
REGEX_ESCAPE : /\\[^\$]/g
# Token cleaning regexes.