aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/smali/locals.scm
diff options
context:
space:
mode:
authorEvan Richter2023-12-19 23:31:27 +0000
committerGitHub2023-12-19 23:31:27 +0000
commita98b8ddd1a0337b7d4bf1b9722066685e5d3f16e (patch)
tree7e647d9c87e63bda28e7d3e3b8b4a308f2fa049a /runtime/queries/smali/locals.scm
parent63218a512687cf6cfdbd11f088d0a2cb7d4dfcb8 (diff)
add smali language support (#9089)
Diffstat (limited to 'runtime/queries/smali/locals.scm')
-rw-r--r--runtime/queries/smali/locals.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/runtime/queries/smali/locals.scm b/runtime/queries/smali/locals.scm
new file mode 100644
index 00000000..34369490
--- /dev/null
+++ b/runtime/queries/smali/locals.scm
@@ -0,0 +1,42 @@
+[
+ (class_directive)
+ (expression)
+ (annotation_directive)
+ (array_data_directive)
+ (method_definition)
+ (packed_switch_directive)
+ (sparse_switch_directive)
+ (subannotation_directive)
+] @local.scope
+
+[
+ (identifier)
+ (class_identifier)
+ (label)
+ (jmp_label)
+] @local.reference
+
+(enum_reference
+ (field_identifier) @local.definition)
+
+((field_definition
+ (access_modifiers) @_mod
+ (field_identifier) @local.definition)
+ (#eq? @_mod "enum"))
+
+(field_definition
+ (field_identifier) @local.definition
+ (field_type) @local.definition)
+
+(annotation_key) @local.definition
+
+(method_definition
+ (method_signature (method_identifier) @local.definition))
+
+(param_identifier) @local.definition
+
+(annotation_directive
+ (class_identifier) @local.definition)
+
+(class_directive
+ (class_identifier) @local.definition)