Skip to content

Commit b626a8c

Browse files
committed
Parser: 'All' -> 'all', remove unused rule
1 parent 61b2ffa commit b626a8c

File tree

2 files changed

+21243
-31929
lines changed

2 files changed

+21243
-31929
lines changed

crates/ruff_python_parser/src/python.lalrpop

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ IpyHelpEndEscapeCommandStatement: ast::Stmt = {
372372
// We are permissive than the original implementation because we would allow whitespace
373373
// between the expression and the suffix while the IPython implementation doesn't allow it.
374374
// For example, `foo ?` would be valid in our case but invalid from IPython.
375-
<location:@L> <e:Expression<"All">> <suffix:("?")+> <end_location:@R> =>? {
375+
<location:@L> <e:Expression<"all">> <suffix:("?")+> <end_location:@R> =>? {
376376
fn unparse_expr(expr: &ast::Expr, buffer: &mut String) -> Result<(), LexicalError> {
377377
match expr {
378378
ast::Expr::Name(ast::ExprName { id, .. }) => {
@@ -1071,7 +1071,6 @@ WithItemsNoAs: Vec<ast::WithItem> = {
10711071
}
10721072

10731073
WithItem<Goal>: ast::WithItem = {
1074-
<location:@L> <context_expr: Test<Goal>> <end_location:@R> if Goal != "as" => ast::WithItem { context_expr, optional_vars: None, range: (location..end_location).into() },
10751074
<location:@L> <context_expr:Test<"all">> "as" <vars:Expression<"all">> <end_location:@R> => {
10761075
let optional_vars = Some(Box::new(set_context(vars, ast::ExprContext::Store)));
10771076
ast::WithItem { context_expr, optional_vars, range: (location..end_location).into() }

0 commit comments

Comments
 (0)