diff options
author | Mihai Bazon <mihai@bazon.net> | 2013-05-09 08:44:24 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2013-05-09 08:44:24 +0300 |
commit | 064e7aa1bbb70baec40a9812a8801627846bde2f (patch) | |
tree | 4b50c5a06bec349d6d243f55e0d94ac162e3e4f7 /lib/parse.js | |
parent | 1e9f98aa51fa87678c6d5191903fc249df4f3e35 (diff) | |
download | tracifyjs-064e7aa1bbb70baec40a9812a8801627846bde2f.tar.gz tracifyjs-064e7aa1bbb70baec40a9812a8801627846bde2f.zip |
Fix is_assignable
(not likely to be noticed, it's only used in `strict` parse mode)
Diffstat (limited to 'lib/parse.js')
-rw-r--r-- | lib/parse.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/parse.js b/lib/parse.js index c45c064e..c8c5d0a0 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -1340,15 +1340,8 @@ function parse($TEXT, options) { function is_assignable(expr) { if (!options.strict) return true; - switch (expr[0]+"") { - case "dot": - case "sub": - case "new": - case "call": - return true; - case "name": - return expr[1] != "this"; - } + if (expr instanceof AST_This) return false; + return (expr instanceof AST_PropAccess || expr instanceof AST_Symbol); }; var maybe_assign = function(no_in) { |