mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-03 18:29:04 +00:00
Merge pull request #4340 from harupy/fix-locations-of-parethesized-expressions
Fix the start and end locations of `Tuple`
This commit is contained in:
commit
c16e08d59b
13 changed files with 41 additions and 41 deletions
|
@ -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 { .. } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue