ruff/crates/ruff_python_parser
Dhruv Manilawala 9c98416b96
Avoid lexer infinite loop on invalid input (#6937)
## Summary

This PR fixes a bug which sends the lexer into infinite loop for an invalid input.
The code in question is `[1` where the nesting is never finished. This means
that the lexer will keep emitting the `Err` token forever.

## Test Plan

Add a test case which collects all the tokens from the lexer. This just
makes sure that it doesn't go into infinite loop.
2023-08-28 17:21:38 +05:30
..
src Avoid lexer infinite loop on invalid input (#6937) 2023-08-28 17:21:38 +05:30
build.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
Cargo.toml Update lexer tests to use snapshots (#6658) 2023-08-22 18:23:19 +00:00