Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 80edc2c

Browse files
author
Bastiaan Marinus van de Weerd
committed
Fix nested assignments in Python.
1 parent d0b5947 commit 80edc2c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

languages/tree-sitter-stack-graphs-python/src/stack-graphs.tsg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ attribute node_symbol = node => symbol = (source-text node), source_n
158158
(generator_expression)
159159
(ellipsis)
160160
(list_splat)
161+
(assignment)
161162

162163
; expression list
163164
(expression_list)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
x = 42
2+
3+
print(x)
4+
# ^ defined: 1
5+
6+
y = z = 1337
7+
8+
print(x, y, z)
9+
# ^ defined: 1
10+
# ^ defined: 6
11+
# ^ defined: 6

0 commit comments

Comments
 (0)