File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
crates/ide/src/syntax_highlighting Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -254,15 +254,17 @@ pub(super) fn element(
254
254
k if k. is_keyword ( ) => {
255
255
let h = Highlight :: new ( HlTag :: Keyword ) ;
256
256
match k {
257
- T ! [ break ]
257
+ T ! [ await ]
258
+ | T ! [ break ]
258
259
| T ! [ continue ]
259
260
| T ! [ else]
260
261
| T ! [ if ]
262
+ | T ! [ in]
261
263
| T ! [ loop ]
262
264
| T ! [ match ]
263
265
| T ! [ return ]
264
266
| T ! [ while ]
265
- | T ! [ in ] => h | HlMod :: ControlFlow ,
267
+ | T ! [ yield ] => h | HlMod :: ControlFlow ,
266
268
T ! [ for ] if !is_child_of_impl ( & element) => h | HlMod :: ControlFlow ,
267
269
T ! [ unsafe ] => h | HlMod :: Unsafe ,
268
270
T ! [ true ] | T ! [ false ] => HlTag :: BoolLiteral . into ( ) ,
Original file line number Diff line number Diff line change @@ -47,21 +47,27 @@ pub enum HlMod {
47
47
/// `foo` in `fn foo(x: i32)` is a definition, `foo` in `foo(90 + 2)` is
48
48
/// not.
49
49
Definition ,
50
+ /// Doc-strings like this one.
50
51
Documentation ,
52
+ /// Highlighting injection like rust code in doc strings or ra_fixture.
51
53
Injected ,
54
+ /// Mutable binding.
52
55
Mutable ,
56
+ /// Value that is being consumed in a function call
53
57
Consuming ,
58
+ /// Callable item or value.
54
59
Callable ,
55
- /// Used for associated functions
60
+ /// Used for associated functions.
56
61
Static ,
57
- /// Used for items in impls& traits.
62
+ /// Used for items in traits and impls .
58
63
Associated ,
59
64
/// Used for intra doc links in doc injection.
60
65
IntraDocLink ,
61
66
/// Used for items in traits and trait impls.
62
67
Trait ,
63
68
64
- /// Keep this last!
69
+ // Keep this last!
70
+ /// Used for unsafe functions, mutable statics, union accesses and unsafe operations.
65
71
Unsafe ,
66
72
}
67
73
You can’t perform that action at this time.
0 commit comments