mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 12:06:55 -04:00
Python: highlight raise from statement
This commit is contained in:
parent
c2b2fef3e4
commit
132405f18f
2 changed files with 8 additions and 0 deletions
|
|
@ -240,6 +240,8 @@
|
|||
"finally"
|
||||
] @exception
|
||||
|
||||
(raise_statement "from" @exception)
|
||||
|
||||
(try_statement
|
||||
(else_clause
|
||||
"else" @exception))
|
||||
|
|
|
|||
6
tests/query/highlights/python/raise_from.py
Normal file
6
tests/query/highlights/python/raise_from.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
try:
|
||||
print(1 / 0)
|
||||
except Exception:
|
||||
raise RuntimeError from None
|
||||
# ^ @exception
|
||||
# ^ @exception
|
||||
Loading…
Add table
Add a link
Reference in a new issue