summaryrefslogtreecommitdiff
path: root/queries
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 12:07:15 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 12:07:15 +0100
commit8375f459638f942d51948d466d9365eaa0c2a500 (patch)
tree0bf55baf94554d0e9a79c6342844696faf55342e /queries
parenta4b604c0f7ea0927d40274e6ae15fa710b68aa3e (diff)
downloadcrep-8375f459638f942d51948d466d9365eaa0c2a500.tar.gz
Add Kotlin grammar
Diffstat (limited to 'queries')
-rw-r--r--queries/kotlin.h18
-rw-r--r--queries/kotlin.scm8
2 files changed, 26 insertions, 0 deletions
diff --git a/queries/kotlin.h b/queries/kotlin.h
new file mode 100644
index 0000000..2b9a386
--- /dev/null
+++ b/queries/kotlin.h
@@ -0,0 +1,18 @@
+unsigned char query_kotlin[] = {
+ 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65,
+ 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20,
+ 0x22, 0x66, 0x75, 0x6e, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65,
+ 0x0a, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x28, 0x69, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66,
+ 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x28, 0x66, 0x75, 0x6e, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70,
+ 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x29, 0x20, 0x40,
+ 0x66, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x0a, 0x0a, 0x28, 0x63,
+ 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x22, 0x63, 0x6c, 0x61, 0x73,
+ 0x73, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x28, 0x69, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d,
+ 0x65, 0x29, 0x0a
+};
+unsigned int query_kotlin_len = 171;
diff --git a/queries/kotlin.scm b/queries/kotlin.scm
new file mode 100644
index 0000000..a507edf
--- /dev/null
+++ b/queries/kotlin.scm
@@ -0,0 +1,8 @@
+(function_declaration
+ "fun" @ftype
+ name: (identifier) @fname
+ (function_value_parameters) @fparams)
+
+(class_declaration
+ "class" @ftype
+ name: (identifier) @fname)