Merge pull request #4340 from harupy/fix-locations-of-parethesized-expressions

Fix the start and end locations of `Tuple`
This commit is contained in:
Jim Fasarakis-Hilliard 2022-12-18 15:17:40 +02:00 committed by GitHub
commit c16e08d59b
13 changed files with 41 additions and 41 deletions

View file

@ -1089,7 +1089,7 @@ AtomAs<Goal>: Goal = {
node: ast::ExprKind::ListComp { elt: Box::new(elt), generators }
}.into()
},
"(" <location:@L> <items:OneOrMore<TestOrStarNamedExprOrWithitem>> <trailing_comma:","?> <end_location:@R> ")" =>? {
<location:@L> "(" <items:OneOrMore<TestOrStarNamedExprOrWithitem>> <trailing_comma:","?> ")" <end_location:@R> =>? {
if items.len() == 1 && items[0].1.is_none() && trailing_comma.is_none() {
match items[0].0.node {
ast::ExprKind::Starred { .. } => {