diff --git a/lib/nodes.js b/lib/nodes.js index e7fa4f53..7fcb9917 100644 --- a/lib/nodes.js +++ b/lib/nodes.js @@ -243,7 +243,7 @@ Expressions.prototype.compileExpression = function(node, o) { var code; while (node !== (node = node.unwrap())) { - + continue; } node = node.unfoldSoak(o) || node; node.tags.front = true; @@ -997,14 +997,13 @@ return new Op(this.context.slice(0, -1), left, new Assign(rite, this.value)).compile(o); }; Assign.prototype.matchParens = function(o, obj) { - var _ref2, idx; while (obj !== (obj = obj.unwrap())) { - + continue; } if (!(obj instanceof Literal || obj instanceof Value)) { throw SyntaxError('nonreference in destructuring assignment shorthand.'); } - return _ref2 = Value.wrap(obj).cacheReference(o), obj = _ref2[0], idx = _ref2[1], _ref2; + return Value.wrap(obj).cacheReference(o); }; return Assign; })(); diff --git a/src/nodes.coffee b/src/nodes.coffee index e71ea4c2..54ba14fb 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -232,7 +232,7 @@ exports.Expressions = class Expressions extends Base # return the result, and it's an expression, simply return it. If it's a # statement, ask the statement to do so. compileExpression: (node, o) -> - while node isnt node = node.unwrap() then + continue until node is node = node.unwrap() node = node.unfoldSoak(o) or node node.tags.front = on o.level = LEVEL_TOP @@ -846,11 +846,10 @@ exports.Assign = class Assign extends Base return new Op(@context.slice(0, -1), left, new Assign(rite, @value)).compile o matchParens: (o, obj) -> - until obj is obj = obj.unwrap() then + continue until obj is obj = obj.unwrap() unless obj instanceof Literal or obj instanceof Value throw SyntaxError 'nonreference in destructuring assignment shorthand.' - [obj, idx] = Value.wrap(obj).cacheReference o - + Value.wrap(obj).cacheReference o #### Code