ruff/crates/ruff_python_parser/src
Charlie Marsh 774c77adae
Avoid off-by-one error in with-item named expressions (#8915)
## Summary

Given `with (a := b): pass`, we truncate the `WithItem` range by one on
both sides such that the parentheses are part of the statement, rather
than the item. However, for `with (a := b) as x: pass`, we want to avoid
this trick.

Closes https://github.com/astral-sh/ruff/issues/8913.
2023-11-30 00:11:04 +00:00
..
lexer perf(parser): use memchr for lexing comments (#8193) 2023-10-27 02:07:43 +01:00
snapshots Avoid off-by-one error in with-item named expressions (#8915) 2023-11-30 00:11:04 +00:00
context.rs Remove Parse trait (#6235) 2023-08-01 18:35:03 +02:00
function.rs Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
invalid.rs Reject more syntactically invalid Python programs (#8524) 2023-11-07 07:16:06 -05:00
lexer.rs Lexer start of line is false only for Mode::Expression (#8880) 2023-11-28 20:38:25 +00:00
lib.rs Reject more syntactically invalid Python programs (#8524) 2023-11-07 07:16:06 -05:00
parser.rs Update to Rust 1.74 and use new clippy lints table (#8722) 2023-11-16 18:12:46 -05:00
python.lalrpop Avoid off-by-one error in with-item named expressions (#8915) 2023-11-30 00:11:04 +00:00
python.rs Avoid off-by-one error in with-item named expressions (#8915) 2023-11-30 00:11:04 +00:00
soft_keywords.rs Lexer start of line is false only for Mode::Expression (#8880) 2023-11-28 20:38:25 +00:00
string.rs remove several uses of unsafe (#8600) 2023-11-28 09:50:03 -05:00
token.rs Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
typing.rs Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00