mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-26 23:10:32 +00:00
auto-sync: Fix some tree-sitter queries (#2255)
This commit is contained in:
parent
009ead2257
commit
61273ff88b
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -25,7 +25,7 @@ class STIFeatureBits(Patch):
|
||||
" )"
|
||||
" (argument_list)"
|
||||
" )"
|
||||
" ((qualified_identifier) @flag)"
|
||||
" (subscript_argument_list ((qualified_identifier) @flag))"
|
||||
") @sti_feature_bits"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user