Skip to content

Commit 65a62b8

Browse files
committed
Use entire range for generators-as-arguments
1 parent d94d0ac commit 65a62b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/parser/python.lalrpop

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,11 +1274,11 @@ ArgumentList: ArgumentList = {
12741274
};
12751275

12761276
FunctionArgument: (Option<(ast::Location, ast::Location, Option<String>)>, ast::Expr) = {
1277-
<e:NamedExpressionTest> <c:CompFor?> => {
1277+
<location:@L> <e:NamedExpressionTest> <c:CompFor?> <end_location:@R> => {
12781278
let expr = match c {
12791279
Some(c) => ast::Expr {
1280-
location: e.location,
1281-
end_location: e.end_location,
1280+
location,
1281+
end_location: Some(end_location),
12821282
custom: (),
12831283
node: ast::ExprKind::GeneratorExp {
12841284
elt: Box::new(e),

0 commit comments

Comments
 (0)