1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

allowing empty parens.

This commit is contained in:
Jeremy Ashkenas 2010-08-17 21:31:32 -04:00
parent 536e24b024
commit ec54b50c67
3 changed files with 73 additions and 68 deletions

View file

@ -354,6 +354,8 @@
Parenthetical: [ Parenthetical: [
o("( Line )", function() { o("( Line )", function() {
return new ParentheticalNode($2); return new ParentheticalNode($2);
}), o("( )", function() {
return new ParentheticalNode(new LiteralNode(''));
}) })
], ],
WhileSource: [ WhileSource: [

File diff suppressed because one or more lines are too long

View file

@ -399,6 +399,7 @@ grammar =
# the trick. # the trick.
Parenthetical: [ Parenthetical: [
o "( Line )", -> new ParentheticalNode $2 o "( Line )", -> new ParentheticalNode $2
o "( )", -> new ParentheticalNode new LiteralNode ''
] ]
# The condition portion of a while loop. # The condition portion of a while loop.