fixing comments as the last line of a block

This commit is contained in:
Jeremy Ashkenas 2010-01-20 20:36:31 -05:00
parent a8ae37a428
commit 791d874058
2 changed files with 5 additions and 1 deletions

View File

@ -70,7 +70,7 @@ module CoffeeScript
@tokens.delete_at(i + 2)
@tokens.delete_at(i - 2)
next 0
elsif prev[0] == "\n" && [:INDENT, :OUTDENT].include?(after[0])
elsif prev[0] == "\n" && [:INDENT].include?(after[0])
@tokens.delete_at(i + 2)
@tokens[i - 1] = after
next 1

View File

@ -14,4 +14,8 @@ switch 'string'
when null
something_else()
=>
code()
# comment
print(func())