Skip to content

Commit 597c4bb

Browse files
committed
Always allow dedents to be recognized during error recovery
1 parent 7473026 commit 597c4bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scanner.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ struct Scanner {
274274
}
275275
}
276276

277-
if (found_end_of_line && !error_recovery_mode) {
277+
if (found_end_of_line) {
278278
if (!indent_length_stack.empty()) {
279279
uint16_t current_indent_length = indent_length_stack.back();
280280

@@ -301,7 +301,7 @@ struct Scanner {
301301
}
302302
}
303303

304-
if (valid_symbols[NEWLINE]) {
304+
if (valid_symbols[NEWLINE] && !error_recovery_mode) {
305305
lexer->result_symbol = NEWLINE;
306306
return true;
307307
}

0 commit comments

Comments
 (0)