mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Allow except* to be written as except *
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.
This commit is contained in:
@@ -19,3 +19,8 @@ else:
|
||||
finally:
|
||||
u
|
||||
v
|
||||
|
||||
try:
|
||||
pass
|
||||
except *foo as e:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user