Fix locations of parethesized expressions

This commit is contained in:
harupy 2022-12-18 20:53:30 +09:00
parent 6e89b3ab1a
commit ff00460ff4
13 changed files with 41 additions and 41 deletions

View file

@ -1090,7 +1090,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 { .. } => {