Skip to content

Commit 9b67b5f

Browse files
Merge branch 'whitespace-before-closing-parens' of git://github.com/audreyt/CoffeeScriptRedux
Conflicts: lib/coffee-script/parser.js
2 parents 22ea3cc + 8edff18 commit 9b67b5f

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

lib/coffee-script/parser.js

Lines changed: 20 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/grammar.pegjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,9 +494,9 @@ primaryExpression
494494
e.raw = '(' + t0 + e.raw + d + t1 + ')';
495495
return e;
496496
}
497-
/ "(" ws0:_ e:expression ws1:_ t:TERMINATOR? ")" {
497+
/ "(" ws0:_ e:expression ws1:_ t:TERMINATOR? ws2:_ ")" {
498498
e = e.clone();
499-
e.raw = '(' + ws0 + e.raw + ws1 + t + ')';
499+
e.raw = '(' + ws0 + e.raw + ws1 + t + ws2 + ')';
500500
return e;
501501
}
502502
contextVar

test/functions.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ suite 'Function Literals', ->
1616
fn = () ->
1717
eq 'function', typeof fn
1818
eq undefined, fn()
19+
fn = (->
20+
)
21+
eq 'function', typeof fn
22+
eq undefined, fn()
1923

2024
test 'multiple nested single-line functions', ->
2125
func = (x) -> (x) -> (x) -> x

0 commit comments

Comments
 (0)