fix(python): update queries for expression_statement supertype
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
; From tree-sitter-python licensed under MIT License
|
||||
; Copyright (c) 2016 Max Brunsfeld
|
||||
;
|
||||
; Modified from nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
; Modifications Copyright 2026 Oscar Wallberg
|
||||
; Licensed under Apache-2.0
|
||||
;
|
||||
; Variables
|
||||
(identifier) @variable
|
||||
|
||||
@@ -80,9 +85,16 @@
|
||||
] @string.escape
|
||||
|
||||
; doc-strings
|
||||
(expression_statement
|
||||
[
|
||||
(module
|
||||
.
|
||||
(string
|
||||
(string_content) @spell) @string.documentation)
|
||||
(block
|
||||
.
|
||||
(string
|
||||
(string_content) @spell) @string.documentation)
|
||||
]
|
||||
|
||||
; Tokens
|
||||
[
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
; Modified from nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
; Modifications Copyright 2026 Oscar Wallberg
|
||||
; Licensed under Apache-2.0
|
||||
|
||||
[
|
||||
(import_from_statement)
|
||||
(generator_expression)
|
||||
@@ -51,8 +55,7 @@
|
||||
":"
|
||||
(ERROR
|
||||
(block
|
||||
(expression_statement
|
||||
(identifier) @_except) @indent.branch))
|
||||
(identifier) @_except @indent.branch))
|
||||
(#eq? @_except "except"))
|
||||
|
||||
((function_definition) @indent.begin
|
||||
|
||||
Reference in New Issue
Block a user