File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2530,22 +2530,22 @@ impl Parser {
2530
2530
}
2531
2531
2532
2532
2533
- // parse a 'for' or ' do'.
2534
- // the 'for' and ' do' expressions parse as calls , but look like
2535
- // function calls followed by a closure expression.
2533
+ // parse a 'do'.
2534
+ // the 'do' expression parses as a call , but looks like
2535
+ // a function call followed by a closure expression.
2536
2536
pub fn parse_sugary_call_expr ( & self ,
2537
2537
lo : BytePos ,
2538
2538
keyword : ~str ,
2539
2539
sugar : CallSugar ,
2540
2540
ctor: |v: @Expr | -> Expr_ )
2541
2541
-> @Expr {
2542
2542
// Parse the callee `foo` in
2543
- // for foo || {
2544
- // for foo.bar || {
2543
+ // do foo || {
2544
+ // do foo.bar || {
2545
2545
// etc, or the portion of the call expression before the lambda in
2546
- // for foo() || {
2546
+ // do foo() || {
2547
2547
// or
2548
- // for foo.bar(a) || {
2548
+ // do foo.bar(a) || {
2549
2549
// Turn on the restriction to stop at | or || so we can parse
2550
2550
// them as the lambda arguments
2551
2551
let e = self . parse_expr_res ( RESTRICT_NO_BAR_OR_DOUBLEBAR_OP ) ;
@@ -2592,7 +2592,7 @@ impl Parser {
2592
2592
}
2593
2593
_ => {
2594
2594
// There may be other types of expressions that can
2595
- // represent the callee in `for` and ` do` expressions
2595
+ // represent the callee in `do` expressions
2596
2596
// but they aren't represented by tests
2597
2597
debug ! ( "sugary call on {:?}" , e. node) ;
2598
2598
self . span_fatal (
You can’t perform that action at this time.
0 commit comments