Tweak await span

This commit is contained in:
Michael Goulet 2023-04-25 18:59:16 +00:00
parent 12a2f24b15
commit f0fc4f9acf
86 changed files with 480 additions and 401 deletions

View file

@ -1646,7 +1646,7 @@ impl<'a> Parser<'a> {
// Avoid knock-down errors as we don't know whether to interpret this as `foo().await?`
// or `foo()?.await` (the very reason we went with postfix syntax 😅).
ExprKind::Try(_) => ExprKind::Err,
_ => ExprKind::Await(expr),
_ => ExprKind::Await(expr, await_sp),
};
let expr = self.mk_expr(lo.to(sp), kind);
self.maybe_recover_from_bad_qpath(expr)