From a8618cf1119afe439916b775f0dd5710fdb5082f Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Thu, 23 Dec 2021 08:40:24 +0530 Subject: 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;`.--- runtime/queries/rust/highlights.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/queries') diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 60dd4644..26496c66 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -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" -- cgit v1.2.3-70-g09d2