mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Use entire range for generators-as-arguments
This commit is contained in:
1 parent
d94d0ac720
commit
65a62b8d32
1 file changed
+3
-3
@@ -1274,11 +1274,11 @@ ArgumentList: ArgumentList = {
|
||||
};
|
||||
|
||||
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 {
|
||||
Some(c) => ast::Expr {
|
||||
location: e.location,
|
||||
end_location: e.end_location,
|
||||
location,
|
||||
end_location: Some(end_location),
|
||||
custom: (),
|
||||
node: ast::ExprKind::GeneratorExp {
|
||||
elt: Box::new(e),
|
||||
|
||||
Reference in new issue
Block a user