fix(python): update queries for expression_statement supertype

This commit is contained in:
2026-04-23 22:49:13 +02:00
parent 76b88becef
commit 9fd742d35e
2 changed files with 20 additions and 5 deletions
+15 -3
View File
@@ -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
(string
(string_content) @spell) @string.documentation)
[
(module
.
(string
(string_content) @spell) @string.documentation)
(block
.
(string
(string_content) @spell) @string.documentation)
]
; Tokens
[
+5 -2
View File
@@ -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