diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-22 00:35:39 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-22 00:35:39 +0100 |
| commit | 52040cc19cbdca48f91d4eb91e9b7a782bb5fbd0 (patch) | |
| tree | 8c6a61f5a6db99c4c7a663e1e2c0f069c3794c4b /queries | |
| parent | 8ab1da7853f6dd309f2d3677ca109737f929ab4a (diff) | |
| download | crep-52040cc19cbdca48f91d4eb91e9b7a782bb5fbd0.tar.gz | |
Add Rust, Go and rename examples to tests
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/go.h | 44 | ||||
| -rw-r--r-- | queries/go.scm | 5 | ||||
| -rw-r--r-- | queries/rust.h | 30 | ||||
| -rw-r--r-- | queries/rust.scm | 5 |
4 files changed, 84 insertions, 0 deletions
diff --git a/queries/go.h b/queries/go.h new file mode 100644 index 0000000..c31d212 --- /dev/null +++ b/queries/go.h @@ -0,0 +1,44 @@ +unsigned char query_go[] = { + 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x22, 0x66, + 0x75, 0x6e, 0x63, 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, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, 0x40, 0x66, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x29, 0x0a, 0x28, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, + 0x70, 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 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, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x28, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, + 0x28, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, + 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 0x20, 0x28, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, + 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d, + 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x28, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x29, 0x20, 0x40, 0x66, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x29, 0x0a, 0x28, 0x74, 0x79, + 0x70, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x20, 0x40, 0x66, + 0x74, 0x79, 0x70, 0x65, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x28, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, + 0x79, 0x70, 0x65, 0x3a, 0x20, 0x28, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x29, 0x20, 0x40, 0x66, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x29, 0x0a, 0x28, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x22, 0x20, + 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 0x20, 0x28, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 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, 0x29, 0x0a +}; +unsigned int query_go_len = 491; diff --git a/queries/go.scm b/queries/go.scm new file mode 100644 index 0000000..c4b10db --- /dev/null +++ b/queries/go.scm @@ -0,0 +1,5 @@ +(function_declaration "func" @ftype name: (identifier) @fname parameters: (parameter_list) @fparams) +(method_declaration "func" @ftype receiver: (parameter_list) @fparams name: (field_identifier) @fname) +(type_declaration "type" @ftype (type_spec name: (type_identifier) @fname type: (struct_type) @fparams)) +(type_declaration "type" @ftype (type_spec name: (type_identifier) @fname type: (interface_type) @fparams)) +(const_declaration "const" @ftype (const_spec name: (identifier) @fname)) diff --git a/queries/rust.h b/queries/rust.h new file mode 100644 index 0000000..9bf51e8 --- /dev/null +++ b/queries/rust.h @@ -0,0 +1,30 @@ +unsigned char query_rust[] = { + 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x74, + 0x65, 0x6d, 0x20, 0x22, 0x66, 0x6e, 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, 0x0a, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6e, 0x61, 0x6d, + 0x65, 0x3a, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, + 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x28, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, + 0x74, 0x65, 0x6d, 0x20, 0x22, 0x65, 0x6e, 0x75, 0x6d, 0x22, 0x20, 0x40, + 0x66, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, + 0x28, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d, 0x65, + 0x29, 0x0a, 0x28, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5f, 0x69, 0x74, 0x65, + 0x6d, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x74, 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, 0x29, 0x0a, 0x28, 0x74, 0x72, 0x61, + 0x69, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x22, 0x74, 0x72, 0x61, + 0x69, 0x74, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6e, + 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, + 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a +}; +unsigned int query_rust_len = 319; diff --git a/queries/rust.scm b/queries/rust.scm new file mode 100644 index 0000000..fecde04 --- /dev/null +++ b/queries/rust.scm @@ -0,0 +1,5 @@ +(function_item "fn" @ftype name: (identifier) @fname parameters: (parameters) @fparams) +(struct_item "struct" @ftype name: (type_identifier) @fname) +(enum_item "enum" @ftype name: (type_identifier) @fname) +(const_item "const" @ftype name: (identifier) @fname) +(trait_item "trait" @ftype name: (type_identifier) @fname) |
