summaryrefslogtreecommitdiff
path: root/queries
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 11:42:13 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 11:42:13 +0100
commita218a52d3627974aa106463670f2ce4bed7555fd (patch)
treeba3d3692d42ded90250990aaaa14e6b72f910680 /queries
parent19dadd080226d2e7c6dc44a53eb0ee3ee2afcbae (diff)
downloadcrep-a218a52d3627974aa106463670f2ce4bed7555fd.tar.gz
Add Zig grammar
Diffstat (limited to 'queries')
-rw-r--r--queries/zig.h17
-rw-r--r--queries/zig.scm6
2 files changed, 23 insertions, 0 deletions
diff --git a/queries/zig.h b/queries/zig.h
new file mode 100644
index 0000000..cf78311
--- /dev/null
+++ b/queries/zig.h
@@ -0,0 +1,17 @@
+unsigned char query_zig[] = {
+ 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65,
+ 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x0a, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
+ 0x65, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x0a, 0x20, 0x20, 0x28, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66,
+ 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x0a,
+ 0x20, 0x20, 0x5b, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x64,
+ 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x20,
+ 0x28, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x20, 0x28, 0x65, 0x72, 0x72, 0x6f,
+ 0x72, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x5d, 0x29, 0x0a
+};
+unsigned int query_zig_len = 165;
diff --git a/queries/zig.scm b/queries/zig.scm
new file mode 100644
index 0000000..60f57b3
--- /dev/null
+++ b/queries/zig.scm
@@ -0,0 +1,6 @@
+(function_declaration
+ name: (identifier) @fname)
+
+(variable_declaration
+ (identifier) @fname
+ [(struct_declaration) (enum_declaration) (error_set_declaration)])