Fix parsing a.case /= 1

Close #286
This commit is contained in:
Mihai Bazon
2013-09-02 11:09:54 +03:00
parent 78a217b94c
commit b0ca896d98

View File

@@ -254,10 +254,12 @@ function tokenizer($TEXT, filename) {
S.tokpos = S.pos;
};
var prev_was_dot = false;
function token(type, value, is_comment) {
S.regex_allowed = ((type == "operator" && !UNARY_POSTFIX(value)) ||
(type == "keyword" && KEYWORDS_BEFORE_EXPRESSION(value)) ||
(!prev_was_dot && type == "keyword" && KEYWORDS_BEFORE_EXPRESSION(value)) ||
(type == "punc" && PUNC_BEFORE_EXPRESSION(value)));
prev_was_dot = (type == "punc" && value == ".");
var ret = {
type : type,
value : value,