Skip to content

Commit

Permalink
Update crates/ruff_python_parser/src/parser/expression.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Micha Reiser <[email protected]>
  • Loading branch information
dhruvmanila and MichaReiser authored Apr 11, 2024
1 parent 86ee016 commit 023754c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/ruff_python_parser/src/parser/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1933,15 +1933,15 @@ impl<'src> Parser<'src> {
fn parse_comprehension(&mut self) -> ast::Comprehension {
let start = self.node_start();

let is_async = if self.eat(TokenKind::Async) {
let is_async = self.eat(TokenKind::Async);

if is_async {
// test_err comprehension_missing_for_after_async
// (async)
// (x async x in iter)
self.expect(TokenKind::For);
true
} else {
self.bump(TokenKind::For);
false
};

let saved_context = self.set_ctx(ParserCtxFlags::FOR_TARGET);
Expand Down

0 comments on commit 023754c

Please sign in to comment.