diff options
author | angelodlfrtr | 2023-03-18 14:17:02 +0000 |
---|---|---|
committer | GitHub | 2023-03-18 14:17:02 +0000 |
commit | ac2a7731a6d04b8b913f49531058c7e2a843efd5 (patch) | |
tree | 9158c5e96ba50ebaa4a4b15c5b7d20384cab68d7 /runtime/queries/capnp/locals.scm | |
parent | 9f5374bf47624d59e7bbcaa9382dbe06022acef7 (diff) |
Add language support for Cap’n Proto format (#6325)
Diffstat (limited to 'runtime/queries/capnp/locals.scm')
-rw-r--r-- | runtime/queries/capnp/locals.scm | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/runtime/queries/capnp/locals.scm b/runtime/queries/capnp/locals.scm new file mode 100644 index 00000000..e98ce260 --- /dev/null +++ b/runtime/queries/capnp/locals.scm @@ -0,0 +1,96 @@ +; Scopes + +[ + (message) + (annotation_targets) + (const_list) + (enum) + (interface) + (implicit_generics) + (generics) + (group) + (method_parameters) + (named_return_types) + (struct) + (struct_shorthand) + (union) +] @local.scope + +; References + +[ + (extend_type) + (field_type) +] @local.reference +(custom_type (type_identifier) @local.reference) +(custom_type + (generics + (generic_parameters + (generic_identifier) @local.reference))) + +; Definitions + +(annotation_definition_identifier) @local.definition + +(const_identifier) @local.definition + +(enum (enum_identifier) @local.definition) + +[ + (enum_member) + (field_identifier) +] @local.definition + +(method_identifier) @local.definition + +(namespace) @local.definition + +[ + (param_identifier) + (return_identifier) +] @local.definition + +(group (type_identifier) @local.definition) + +(struct (type_identifier) @local.definition) + +(union (type_identifier) @local.definition) + +(interface (type_identifier) @local.definition) + +; Generics Related (don't know how to combine these) + +(struct + (generics + (generic_parameters + (generic_identifier) @local.definition))) + +(interface + (generics + (generic_parameters + (generic_identifier) @local.definition))) + +(method + (implicit_generics + (implicit_generic_parameters + (generic_identifier) @local.definition))) + +(method + (generics + (generic_parameters + (generic_identifier) @local.definition))) + +(annotation + (generics + (generic_parameters + (generic_identifier) @local.definition))) + +(replace_using + (generics + (generic_parameters + (generic_identifier) @local.definition))) + +(return_type + (generics + (generic_parameters + (generic_identifier) @local.definition))) |