ruff
e137c824 - Avoid consuming newline for unterminated string (#12067)

Commit
1 year ago
Avoid consuming newline for unterminated string (#12067) ## Summary This PR fixes the lexer logic to **not** consume the newline character for an unterminated string literal. Currently, the lexer would consume it to be part of the string itself but that would be bad for recovery because then the lexer wouldn't emit the newline token ever. This PR fixes that to avoid consuming the newline character in that case. This was discovered during https://github.com/astral-sh/ruff/pull/12060. ## Test Plan Update the snapshots and validate them.
Author
Parents
Loading