diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:40:55 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:40:55 +0100 |
| commit | 5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda (patch) | |
| tree | 1acdfa5220cd13b7be43a2a01368e80d306473ca /queries | |
| parent | c7ab12bba64d9c20ccd79b132dac475f7bc3923e (diff) | |
| download | crep-5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda.tar.gz | |
Add Redis source code for testing
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/c.h | 55 | ||||
| -rw-r--r-- | queries/c.scm | 4 | ||||
| -rw-r--r-- | queries/python.h | 11 | ||||
| -rw-r--r-- | queries/python.scm | 1 |
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 |
