auto-sync: Fix some tree-sitter queries (#2255)

This commit is contained in:
Khairul Azhar Kasmiran 2024-01-20 23:43:06 +08:00 committed by GitHub
parent 009ead2257
commit 61273ff88b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ class FeatureBits(Patch):
return (
"(subscript_expression "
' ((identifier) @id (#match? @id "[fF]eatureBits"))'
" ((qualified_identifier) @qid)"
" (subscript_argument_list ((qualified_identifier) @qid))"
") @feature_bits"
)

View File

@ -16,7 +16,7 @@ class NamespaceArch(Patch):
super().__init__(priority)
def get_search_pattern(self) -> str:
return "(namespace_definition" " (identifier)" " (declaration_list) @decl_list" ") @namespace_def"
return "(namespace_definition" " (namespace_identifier)" " (declaration_list) @decl_list" ") @namespace_def"
def get_main_capture_name(self) -> str:
return "namespace_def"

View File

@ -18,7 +18,7 @@ class NamespaceLLVM(Patch):
def get_search_pattern(self) -> str:
return (
"(namespace_definition"
' (identifier) @id (#eq? @id "llvm")'
' (namespace_identifier) @id (#eq? @id "llvm")'
" (declaration_list) @decl_list"
") @namespace_def"
)

View File

@ -25,7 +25,7 @@ class STIFeatureBits(Patch):
" )"
" (argument_list)"
" )"
" ((qualified_identifier) @flag)"
" (subscript_argument_list ((qualified_identifier) @flag))"
") @sti_feature_bits"
)