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:
parent
34766e242a
commit
a8618cf111
1 changed files with 6 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue