mirror of https://github.com/astral-sh/ruff
Use entire range for generators-as-arguments
This commit is contained in:
parent
659f4dd8bf
commit
56c73cc63d
|
|
@ -1274,11 +1274,11 @@ ArgumentList: ArgumentList = {
|
||||||
};
|
};
|
||||||
|
|
||||||
FunctionArgument: (Option<(ast::Location, ast::Location, Option<String>)>, ast::Expr) = {
|
FunctionArgument: (Option<(ast::Location, ast::Location, Option<String>)>, ast::Expr) = {
|
||||||
<e:NamedExpressionTest> <c:CompFor?> => {
|
<location:@L> <e:NamedExpressionTest> <c:CompFor?> <end_location:@R> => {
|
||||||
let expr = match c {
|
let expr = match c {
|
||||||
Some(c) => ast::Expr {
|
Some(c) => ast::Expr {
|
||||||
location: e.location,
|
location,
|
||||||
end_location: e.end_location,
|
end_location: Some(end_location),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ast::ExprKind::GeneratorExp {
|
node: ast::ExprKind::GeneratorExp {
|
||||||
elt: Box::new(e),
|
elt: Box::new(e),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue