diff options
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/odin.h | 39 | ||||
| -rw-r--r-- | queries/odin.scm | 25 |
2 files changed, 64 insertions, 0 deletions
diff --git a/queries/odin.h b/queries/odin.h new file mode 100644 index 0000000..51630b0 --- /dev/null +++ b/queries/odin.h @@ -0,0 +1,39 @@ +unsigned char query_odin[] = { + 0x28, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75, 0x72, 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, 0x28, + 0x70, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75, 0x72, 0x65, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x63, 0x22, 0x20, 0x40, 0x66, 0x74, + 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x29, 0x20, 0x40, 0x66, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x29, 0x0a, 0x0a, 0x28, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 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, 0x28, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75, + 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x63, + 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x29, 0x20, 0x40, 0x66, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x29, 0x29, + 0x0a, 0x0a, 0x28, 0x76, 0x61, 0x72, 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, 0x28, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x64, 0x75, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, + 0x72, 0x6f, 0x63, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, 0x70, 0x65, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x29, 0x20, 0x40, 0x66, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x29, 0x29, 0x0a, 0x0a, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 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, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x22, 0x20, 0x40, 0x66, + 0x74, 0x79, 0x70, 0x65, 0x29, 0x0a, 0x0a, 0x28, 0x65, 0x6e, 0x75, 0x6d, + 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, 0x22, 0x65, 0x6e, 0x75, 0x6d, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, + 0x70, 0x65, 0x29, 0x0a +}; +unsigned int query_odin_len = 424; diff --git a/queries/odin.scm b/queries/odin.scm new file mode 100644 index 0000000..47e3bab --- /dev/null +++ b/queries/odin.scm @@ -0,0 +1,25 @@ +(procedure_declaration + (identifier) @fname + (procedure + "proc" @ftype + (parameters) @fparams)) + +(const_declaration + (identifier) @fname + (procedure + "proc" @ftype + (parameters) @fparams)) + +(var_declaration + (identifier) @fname + (procedure + "proc" @ftype + (parameters) @fparams)) + +(struct_declaration + (identifier) @fname + "struct" @ftype) + +(enum_declaration + (identifier) @fname + "enum" @ftype) |
