mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-18 01:39:00 +00:00
Python: highlight raise from statement
This commit is contained in:
committed by
Stephan Seitz
parent
c2b2fef3e4
commit
132405f18f
@@ -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
|
||||
Reference in New Issue
Block a user