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;`.
pull/1341/head
Gokul Soumya 3 years ago committed by GitHub
parent 34766e242a
commit a8618cf111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -127,11 +127,16 @@
"await" "await"
] @keyword.control ] @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) (crate)
(super) (super)
"as" "as"
"use"
"pub" "pub"
"mod" "mod"
"extern" "extern"

Loading…
Cancel
Save