Add precise rust queries for use, mod, as (#1339)

- Differentiates between `as` keyword as a binary type cast
  operator and import renamer.
- `mod` and `use` are now under `@keyword.control.import`,
  but `mod` is a `@keyword` if used as `mod name;`.
This commit is contained in:
Gokul Soumya 2021-12-23 08:40:24 +05:30 committed by GitHub
parent 34766e242a
commit a8618cf111
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,11 +127,16 @@
"await"
] @keyword.control
"use" @keyword.control.import
(mod_item "mod" @keyword.control.import !body)
(use_as_clause "as" @keyword.control.import)
(type_cast_expression "as" @keyword.operator)
[
(crate)
(super)
"as"
"use"
"pub"
"mod"
"extern"