ruff/crates/ruff_python_parser/src
Dhruv Manilawala 4d49d5e845
Add eat_char2 for the lexer (#6968)
## Summary

This PR adds a new helper method on the `Cursor` called `eat_char2`
which is similar to `eat_char` but accepts 2 characters instead of 1. It'll
`bump` the cursor twice if both characters are found on lookahead.

## Test Plan

`cargo test`
2023-08-29 17:18:02 +05:30
..
lexer Add eat_char2 for the lexer (#6968) 2023-08-29 17:18:02 +05:30
snapshots Introduce AST nodes for PatternMatchClass arguments (#6881) 2023-08-26 14:45:44 +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
lexer.rs Add eat_char2 for the lexer (#6968) 2023-08-29 17:18:02 +05:30
lib.rs Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
parser.rs Expand NamedExpr range to include full range of parenthesized value (#6632) 2023-08-17 14:34:05 +00:00
python.lalrpop Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
python.rs Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
soft_keywords.rs Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
string.rs Remove unused f-string error type (#6941) 2023-08-28 18:34:48 +05:30
token.rs Rename Magic* to IpyEscape* (#6395) 2023-08-09 13:28:18 +00:00
typing.rs Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00