Validate that the given expression is a valid delete target. If the expression is a list or tuple, then validate each element in the list. See:
(&mut self, expr: &Expr)
| 3885 | /// |
| 3886 | /// See: <https://github.com/python/cpython/blob/d864b0094f9875c5613cbb0b7f7f3ca8f1c6b606/Parser/action_helpers.c#L1150-L1180> |
| 3887 | fn validate_delete_target(&mut self, expr: &Expr) { |
| 3888 | match expr { |
| 3889 | Expr::List(ast::ExprList { elts, .. }) | Expr::Tuple(ast::ExprTuple { elts, .. }) => { |
| 3890 | for expr in elts { |
| 3891 | self.validate_delete_target(expr); |
| 3892 | } |
| 3893 | } |
| 3894 | Expr::Name(_) | Expr::Attribute(_) | Expr::Subscript(_) => {} |
| 3895 | _ => self.add_error(ParseErrorType::InvalidDeleteTarget, expr), |
| 3896 | } |
| 3897 | } |
| 3898 | |
| 3899 | /// Classify the `match` soft keyword token. |
| 3900 | /// |
no test coverage detected