Files
codeql/python/extractor/tests/parser/assignment.py
Taus 4f60494019 Python: Support assignments of the form [x,y,z] = w
Surprisingly, the new parser did not support these constructs (and the
relevant test was missing this case), so on files that required the new
parser we were unable to parse this construct.

To fix it, we add `list_pattern` (not to be confused with
`pattern_list`) as a `tree-sitter-python` node that results in a `List`
node in the AST.
2024-10-22 16:06:35 +00:00

20 lines
201 B
Python

#foo[bar].baz[(quux := 5)] = 5
foo = 5
baz, quux = 1, 2
blah : int = 5
just_the_type : float
x, y = z, w = 3, 4
(a, (b, (c, (d, e)))) = (j, (k, (l, (m, n))))
s, *t = u
[v, *w] = x
o,p, = q,r,