diff options
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/glsl.h | 22 | ||||
| -rw-r--r-- | queries/glsl.scm | 9 |
2 files changed, 31 insertions, 0 deletions
diff --git a/queries/glsl.h b/queries/glsl.h new file mode 100644 index 0000000..0a92142 --- /dev/null +++ b/queries/glsl.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | unsigned char query_glsl[] = { | ||
| 2 | 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, | ||
| 3 | 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x74, | ||
| 4 | 0x79, 0x70, 0x65, 0x3a, 0x20, 0x28, 0x5f, 0x29, 0x20, 0x40, 0x66, 0x74, | ||
| 5 | 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, | ||
| 6 | 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, | ||
| 7 | 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, | ||
| 8 | 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, | ||
| 9 | 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20, 0x28, 0x69, 0x64, 0x65, 0x6e, | ||
| 10 | 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, | ||
| 11 | 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, | ||
| 12 | 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x20, 0x28, 0x70, 0x61, 0x72, 0x61, | ||
| 13 | 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x29, 0x20, | ||
| 14 | 0x40, 0x66, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x29, 0x0a, 0x0a, | ||
| 15 | 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, | ||
| 16 | 0x69, 0x66, 0x69, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x22, 0x73, 0x74, 0x72, | ||
| 17 | 0x75, 0x63, 0x74, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 0x0a, | ||
| 18 | 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x28, 0x74, 0x79, 0x70, | ||
| 19 | 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, | ||
| 20 | 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a | ||
| 21 | }; | ||
| 22 | unsigned int query_glsl_len = 226; | ||
diff --git a/queries/glsl.scm b/queries/glsl.scm new file mode 100644 index 0000000..870ebfb --- /dev/null +++ b/queries/glsl.scm | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | (function_definition | ||
| 2 | type: (_) @ftype | ||
| 3 | declarator: (function_declarator | ||
| 4 | declarator: (identifier) @fname | ||
| 5 | parameters: (parameter_list) @fparams)) | ||
| 6 | |||
| 7 | (struct_specifier | ||
| 8 | "struct" @ftype | ||
| 9 | name: (type_identifier) @fname) | ||
