mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Turns out, `except*` is actually not a token on its own according to the Python grammar. This means it's legal to write `except *foo: ...`, which we previously would consider a syntax error. To fix it, we simply break up the `except*` into two separate tokens.
27 lines
210 B
Python
27 lines
210 B
Python
try:
|
|
a
|
|
b
|
|
except* c:
|
|
d
|
|
e
|
|
except* f as g:
|
|
h
|
|
i
|
|
except* (j, k):
|
|
l
|
|
m
|
|
except* (n, o) as p:
|
|
q
|
|
r
|
|
else:
|
|
s
|
|
t
|
|
finally:
|
|
u
|
|
v
|
|
|
|
try:
|
|
pass
|
|
except *foo as e:
|
|
pass
|