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
|
; From tree-sitter-python licensed under MIT License
|
||||||
; Copyright (c) 2016 Max Brunsfeld
|
; 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
|
; Variables
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
@@ -80,9 +85,16 @@
|
|||||||
] @string.escape
|
] @string.escape
|
||||||
|
|
||||||
; doc-strings
|
; doc-strings
|
||||||
(expression_statement
|
[
|
||||||
(string
|
(module
|
||||||
(string_content) @spell) @string.documentation)
|
.
|
||||||
|
(string
|
||||||
|
(string_content) @spell) @string.documentation)
|
||||||
|
(block
|
||||||
|
.
|
||||||
|
(string
|
||||||
|
(string_content) @spell) @string.documentation)
|
||||||
|
]
|
||||||
|
|
||||||
; Tokens
|
; 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)
|
(import_from_statement)
|
||||||
(generator_expression)
|
(generator_expression)
|
||||||
@@ -51,8 +55,7 @@
|
|||||||
":"
|
":"
|
||||||
(ERROR
|
(ERROR
|
||||||
(block
|
(block
|
||||||
(expression_statement
|
(identifier) @_except @indent.branch))
|
||||||
(identifier) @_except) @indent.branch))
|
|
||||||
(#eq? @_except "except"))
|
(#eq? @_except "except"))
|
||||||
|
|
||||||
((function_definition) @indent.begin
|
((function_definition) @indent.begin
|
||||||
|
|||||||
Reference in New Issue
Block a user