patched up lexer to add indentation to single-line flavors of statements -- let's expand this idea

This commit is contained in:
Jeremy Ashkenas
2009-12-30 13:58:00 -05:00
parent 4d514f255b
commit ea58be2838
2 changed files with 21 additions and 1 deletions

View File

@@ -694,7 +694,7 @@ module CoffeeScript
# Rewrite a chain of IfNodes to add a default case as the final else.
def add_else(expressions)
chain? ? @else_body.add_else(expressions) : @else_body = expressions
chain? ? @else_body.add_else(expressions) : @else_body = expressions.unwrap
self
end