mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
passing the funky comment test
This commit is contained in:
@@ -474,7 +474,8 @@
|
|||||||
statement: true
|
statement: true
|
||||||
});
|
});
|
||||||
}), o("Comment TERMINATOR When", function() {
|
}), o("Comment TERMINATOR When", function() {
|
||||||
return $3.comment = $1;
|
$3.comment = $1;
|
||||||
|
return $3;
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
// The most basic form of "if".
|
// The most basic form of "if".
|
||||||
|
|||||||
@@ -370,7 +370,10 @@ case 173:this.$ = new IfNode($$[$0-4+2-1], $$[$0-4+3-1], null, {
|
|||||||
statement: true
|
statement: true
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 174:this.$ = $$[$0-3+3-1].comment = $$[$0-3+1-1];
|
case 174:this.$ = (function () {
|
||||||
|
$$[$0-3+3-1].comment = $$[$0-3+1-1];
|
||||||
|
return $$[$0-3+3-1];
|
||||||
|
}());
|
||||||
break;
|
break;
|
||||||
case 175:this.$ = new IfNode($$[$0-3+2-1], $$[$0-3+3-1]);
|
case 175:this.$ = new IfNode($$[$0-3+2-1], $$[$0-3+3-1]);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -406,7 +406,8 @@ grammar: {
|
|||||||
When: [
|
When: [
|
||||||
o "LEADING_WHEN SimpleArgs Block", -> new IfNode($2, $3, null, {statement: true})
|
o "LEADING_WHEN SimpleArgs Block", -> new IfNode($2, $3, null, {statement: true})
|
||||||
o "LEADING_WHEN SimpleArgs Block TERMINATOR", -> new IfNode($2, $3, null, {statement: true})
|
o "LEADING_WHEN SimpleArgs Block TERMINATOR", -> new IfNode($2, $3, null, {statement: true})
|
||||||
o "Comment TERMINATOR When", -> $3.comment: $1
|
o "Comment TERMINATOR When", ->
|
||||||
|
$3.comment: $1; $3
|
||||||
]
|
]
|
||||||
|
|
||||||
# The most basic form of "if".
|
# The most basic form of "if".
|
||||||
|
|||||||
Reference in New Issue
Block a user