diff --git a/lib/coffee_script/nodes.js b/lib/coffee_script/nodes.js index efc1cd50..e19dd48d 100644 --- a/lib/coffee_script/nodes.js +++ b/lib/coffee_script/nodes.js @@ -1125,7 +1125,7 @@ this.name = __a[0]; this.index = __a[1]; } - this.children = [this.body, this.source, this.filter]; + this.children = compact([this.body, this.source, this.filter]); return this; }, top_sensitive: function top_sensitive() { diff --git a/lib/coffee_script/rewriter.rb b/lib/coffee_script/rewriter.rb index c841f582..6d70327c 100644 --- a/lib/coffee_script/rewriter.rb +++ b/lib/coffee_script/rewriter.rb @@ -20,7 +20,7 @@ module CoffeeScript # Tokens pairs that, in immediate succession, indicate an implicit call. IMPLICIT_FUNC = [:IDENTIFIER, :SUPER, ')', :CALL_END, ']', :INDEX_END] - IMPLICIT_END = [:IF, :UNLESS, :FOR, :WHILE, "\n", :OUTDENT] + IMPLICIT_END = [:IF, :UNLESS, :FOR, :WHILE, "\n", ';', :OUTDENT] IMPLICIT_CALL = [:IDENTIFIER, :NUMBER, :STRING, :JS, :REGEX, :NEW, :PARAM_START, :TRY, :DELETE, :TYPEOF, :SWITCH, :TRUE, :FALSE, :YES, :NO, :ON, :OFF, '!', '!!', :NOT, diff --git a/src/nodes.coffee b/src/nodes.coffee index 49538bad..e00c2452 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -883,7 +883,7 @@ ForNode: exports.ForNode: inherit Node, { @step: source.step @object: !!source.object [@name, @index]: [@index, @name] if @object - @children: [@body, @source, @filter] + @children: compact [@body, @source, @filter] this top_sensitive: ->