Apply suggestions from code review
Co-authored-by: Travis Cross <tc@traviscross.com>
This commit is contained in:
@@ -774,7 +774,7 @@ impl<'a> State<'a> {
|
||||
}
|
||||
}
|
||||
ast::ExprKind::Yield(e, YieldKind::Postfix) => {
|
||||
// it's not possible to have a postfix yield with no expression.
|
||||
// It's not possible to have a postfix yield with no expression.
|
||||
let e = e.as_ref().unwrap();
|
||||
self.print_expr_cond_paren(
|
||||
e,
|
||||
|
||||
@@ -1311,7 +1311,7 @@ impl<'a> Parser<'a> {
|
||||
return self.parse_match_block(lo, match_span, self_arg, MatchKind::Postfix);
|
||||
}
|
||||
|
||||
// Post-fix yield
|
||||
// Parse a postfix `yield`.
|
||||
if self.eat_keyword(exp!(Yield)) {
|
||||
let yield_span = self.prev_token.span;
|
||||
self.psess.gated_spans.gate(sym::yield_expr, yield_span);
|
||||
|
||||
Reference in New Issue
Block a user