Use entire range for generators-as-arguments

This commit is contained in:
Charlie Marsh 2023-02-10 10:39:40 -05:00
parent 31e0962c66
commit dc78f6033b

View file

@ -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),