diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parse.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/parse.js b/lib/parse.js index eab9b64d..97dd6d4b 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -285,7 +285,11 @@ function tokenizer($TEXT, filename, html5_comments, shebang) { S.regex_allowed = ((type == "operator" && !UNARY_POSTFIX(value)) || (type == "keyword" && KEYWORDS_BEFORE_EXPRESSION(value)) || (type == "punc" && PUNC_BEFORE_EXPRESSION(value))); - prev_was_dot = (type == "punc" && value == "."); + if (type == "punc" && value == ".") { + prev_was_dot = true; + } else if (!is_comment) { + prev_was_dot = false; + } var ret = { type : type, value : value, |