Skip to content

Commit

Permalink
fix for jashkenas#1771 fix: only do the check on list comprehensions,…
Browse files Browse the repository at this point in the history
… not objects
  • Loading branch information
michaelficarra committed Oct 18, 2011
1 parent 44bf8c2 commit aa3c62e
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion lib/coffee-script/cake.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/coffee-script/grammar.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/coffee-script/helpers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/coffee-script/index.js
Expand Up @@ -3,7 +3,6 @@

_ref = require('./coffee-script');
for (key in _ref) {
if (!(key in _ref)) continue;
val = _ref[key];
exports[key] = val;
}
Expand Down
1 change: 0 additions & 1 deletion lib/coffee-script/lexer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffee-script/nodes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/nodes.coffee
Expand Up @@ -1592,7 +1592,7 @@ exports.For = class For extends While
forVarPart = "#{ivar} = 0, #{lvar} = #{svar}.length" + if @step then ", #{stepvar} = #{@step.compile(o, LEVEL_OP)}" else ''
stepPart = if @step then "#{ivar} += #{stepvar}" else "#{ivar}++"
forPart = "#{forVarPart}; #{ivar} < #{lvar}; #{stepPart}"
guardPart = "\n#{idt1}if (!(#{ivar} in #{svar})) continue;"
guardPart = "\n#{idt1}if (!(#{ivar} in #{svar})) continue;"
if @returns
resultPart = "#{@tab}#{rvar} = [];\n"
returnResult = "\n#{@tab}return #{rvar};"
Expand Down

0 comments on commit aa3c62e

Please sign in to comment.