mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
fix(python): impossible patterns
This commit is contained in:
parent
c5623d3486
commit
e1820bbda1
3 changed files with 15 additions and 14 deletions
|
|
@ -81,8 +81,10 @@
|
|||
|
||||
; doc-strings
|
||||
(expression_statement
|
||||
(string
|
||||
(string_content) @spell) @string.documentation)
|
||||
(expression
|
||||
(primary_expression
|
||||
(string
|
||||
(string_content) @spell))) @string.documentation)
|
||||
|
||||
; Tokens
|
||||
[
|
||||
|
|
|
|||
|
|
@ -45,16 +45,15 @@
|
|||
":"
|
||||
(#set! indent.immediate 1)) @indent.begin
|
||||
|
||||
(ERROR
|
||||
"try"
|
||||
.
|
||||
":"
|
||||
(ERROR
|
||||
(block
|
||||
(expression_statement
|
||||
(identifier) @_except) @indent.branch))
|
||||
(#eq? @_except "except"))
|
||||
|
||||
; (ERROR
|
||||
; "try"
|
||||
; .
|
||||
; ":"
|
||||
; (ERROR
|
||||
; (block
|
||||
; (expression_statement
|
||||
; (identifier) @_except) @indent.branch))
|
||||
; (#eq? @_except "except"))
|
||||
((function_definition) @indent.begin
|
||||
(#set! indent.immediate 1))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue