... | @@ -48,7 +48,7 @@ disambiguate. Algorithm: |
... | @@ -48,7 +48,7 @@ disambiguate. Algorithm: |
|
|
|
|
|
binaryOps = ["+", "-", "*", "/", "%","<<", ">>", ">>>",
|
|
binaryOps = ["+", "-", "*", "/", "%","<<", ">>", ">>>",
|
|
"&", "|", "^","&&", "||", "?", ":",
|
|
"&", "|", "^","&&", "||", "?", ":",
|
|
"instanceof"
|
|
"instanceof", "in",
|
|
"===", "==", ">=", "<=", "<", ">", "!=", "!=="];
|
|
"===", "==", ">=", "<=", "<", ">", "!=", "!=="];
|
|
|
|
|
|
unaryOps = ["++", "--", "~", "!", "delete", "void", "typeof", "throw", "new"];
|
|
unaryOps = ["++", "--", "~", "!", "delete", "void", "typeof", "throw", "new"];
|
... | @@ -75,8 +75,8 @@ disambiguate. Algorithm: |
... | @@ -75,8 +75,8 @@ disambiguate. Algorithm: |
|
return false
|
|
return false
|
|
else if tok-1 is one of "debugger" "break" "continue" "throw"
|
|
else if tok-1 is one of "debugger" "break" "continue" "throw"
|
|
parse error
|
|
parse error
|
|
else if tok-1 is one of "in" "case"
|
|
else if tok-1 is "case"
|
|
// ... in {...}
|
|
// case {...}
|
|
return false
|
|
return false
|
|
else
|
|
else
|
|
return true
|
|
return true
|
... | | ... | |