mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
fixin up narwhal factory and adding more implicit blocks to the lexer
This commit is contained in:
@@ -693,8 +693,8 @@ module CoffeeScript
|
||||
end
|
||||
|
||||
# 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.unwrap
|
||||
def add_else(exprs)
|
||||
chain? ? @else_body.add_else(exprs) : @else_body = (exprs && exprs.unwrap)
|
||||
self
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user