Python: Fix parenthesized tuple parser bug

We were writing the `parenthesised` attribute twice on tuples, once
because of the explicit parenthetisation, and once because all non-empty
tuples are parenthesised. This made `tree-sitter-graph` unhappy.

To fix this, we now explicitly check whether a tuple is already
parenthesised, and do nothing if that is the case.
This commit is contained in:
Taus
2024-10-28 14:49:45 +00:00
parent b4ecc7937d
commit ef60b730ea
2 changed files with 7 additions and 1 deletions

View File

@@ -35,3 +35,5 @@ t, u,
x, y,
#comment
)
((z,))