summaryrefslogtreecommitdiff
path: root/queries
diff options
context:
space:
mode:
Diffstat (limited to 'queries')
-rw-r--r--queries/c.h55
-rw-r--r--queries/c.scm4
-rw-r--r--queries/python.h11
-rw-r--r--queries/python.scm1
4 files changed, 71 insertions, 0 deletions
diff --git a/queries/c.h b/queries/c.h
new file mode 100644
index 0000000..ef8066b
--- /dev/null
+++ b/queries/c.h
@@ -0,0 +1,55 @@
+unsigned char query_c[] = {
+ 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65,
+ 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x79, 0x70,
+ 0x65, 0x3a, 0x20, 0x28, 0x5f, 0x29, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70,
+ 0x65, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72,
+ 0x3a, 0x20, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x64,
+ 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20, 0x28,
+ 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20,
+ 0x40, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d,
+ 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x20, 0x28, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20,
+ 0x40, 0x66, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x29, 0x0a, 0x28,
+ 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66,
+ 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x79, 0x70, 0x65,
+ 0x3a, 0x20, 0x28, 0x5f, 0x29, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65,
+ 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a,
+ 0x20, 0x28, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x65,
+ 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x63,
+ 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20, 0x28, 0x66, 0x75,
+ 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61,
+ 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72,
+ 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20, 0x28, 0x69, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d,
+ 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73,
+ 0x3a, 0x20, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
+ 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x40, 0x66, 0x70, 0x61, 0x72,
+ 0x61, 0x6d, 0x73, 0x29, 0x29, 0x29, 0x0a, 0x28, 0x64, 0x65, 0x63, 0x6c,
+ 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x79, 0x70, 0x65,
+ 0x3a, 0x20, 0x28, 0x5f, 0x29, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65,
+ 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a,
+ 0x20, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64,
+ 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x64, 0x65,
+ 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20, 0x28, 0x69,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40,
+ 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65,
+ 0x74, 0x65, 0x72, 0x73, 0x3a, 0x20, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d,
+ 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x40,
+ 0x66, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x29, 0x0a, 0x28, 0x64,
+ 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
+ 0x79, 0x70, 0x65, 0x3a, 0x20, 0x28, 0x5f, 0x29, 0x20, 0x40, 0x66, 0x74,
+ 0x79, 0x70, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74,
+ 0x6f, 0x72, 0x3a, 0x20, 0x28, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72,
+ 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20,
+ 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20,
+ 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65,
+ 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x63,
+ 0x6c, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20, 0x28, 0x69, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66,
+ 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
+ 0x65, 0x72, 0x73, 0x3a, 0x20, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65,
+ 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x40, 0x66,
+ 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x29, 0x29
+};
+unsigned int query_c_len = 621;
diff --git a/queries/c.scm b/queries/c.scm
new file mode 100644
index 0000000..013d0a5
--- /dev/null
+++ b/queries/c.scm
@@ -0,0 +1,4 @@
+(function_definition type: (_) @ftype declarator: (function_declarator declarator: (identifier) @fname parameters: (parameter_list) @fparams))
+(function_definition type: (_) @ftype declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) @fname parameters: (parameter_list) @fparams)))
+(declaration type: (_) @ftype declarator: (function_declarator declarator: (identifier) @fname parameters: (parameter_list) @fparams))
+(declaration type: (_) @ftype declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) @fname parameters: (parameter_list) @fparams))) \ No newline at end of file
diff --git a/queries/python.h b/queries/python.h
new file mode 100644
index 0000000..e2122b8
--- /dev/null
+++ b/queries/python.h
@@ -0,0 +1,11 @@
+unsigned char query_python[] = {
+ 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65,
+ 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x22, 0x64, 0x65,
+ 0x66, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 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, 0x20,
+ 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x20,
+ 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x29,
+ 0x20, 0x40, 0x66, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29
+};
+unsigned int query_python_len = 94;
diff --git a/queries/python.scm b/queries/python.scm
new file mode 100644
index 0000000..eb4154c
--- /dev/null
+++ b/queries/python.scm
@@ -0,0 +1 @@
+(function_definition "def" @ftype name: (identifier) @fname parameters: (parameters) @fparams) \ No newline at end of file