mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-08 05:35:22 +00:00
Use entire range for generators-as-arguments
This commit is contained in:
parent
31e0962c66
commit
dc78f6033b
1 changed files with 3 additions and 3 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue