diff options
author | Lukas Wirth <[email protected]> | 2021-04-23 15:43:48 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-04-23 16:24:45 +0100 |
commit | c005ce60a048a5df79b93ce45911ab0c6952a41b (patch) | |
tree | 0f82a955e84e10bbf4e0faebf7a16928dec7c7a4 /crates/ide/src/syntax_highlighting/highlight.rs | |
parent | 85bab7539a050bb2c0eeae93b029ebde2aa48668 (diff) |
Tag `yield` and `await` as ControlFlow in semantic highlighting
Diffstat (limited to 'crates/ide/src/syntax_highlighting/highlight.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting/highlight.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ide/src/syntax_highlighting/highlight.rs b/crates/ide/src/syntax_highlighting/highlight.rs index 18552459b..62213dc47 100644 --- a/crates/ide/src/syntax_highlighting/highlight.rs +++ b/crates/ide/src/syntax_highlighting/highlight.rs | |||
@@ -254,15 +254,17 @@ pub(super) fn element( | |||
254 | k if k.is_keyword() => { | 254 | k if k.is_keyword() => { |
255 | let h = Highlight::new(HlTag::Keyword); | 255 | let h = Highlight::new(HlTag::Keyword); |
256 | match k { | 256 | match k { |
257 | T![break] | 257 | T![await] |
258 | | T![break] | ||
258 | | T![continue] | 259 | | T![continue] |
259 | | T![else] | 260 | | T![else] |
260 | | T![if] | 261 | | T![if] |
262 | | T![in] | ||
261 | | T![loop] | 263 | | T![loop] |
262 | | T![match] | 264 | | T![match] |
263 | | T![return] | 265 | | T![return] |
264 | | T![while] | 266 | | T![while] |
265 | | T![in] => h | HlMod::ControlFlow, | 267 | | T![yield] => h | HlMod::ControlFlow, |
266 | T![for] if !is_child_of_impl(&element) => h | HlMod::ControlFlow, | 268 | T![for] if !is_child_of_impl(&element) => h | HlMod::ControlFlow, |
267 | T![unsafe] => h | HlMod::Unsafe, | 269 | T![unsafe] => h | HlMod::Unsafe, |
268 | T![true] | T![false] => HlTag::BoolLiteral.into(), | 270 | T![true] | T![false] => HlTag::BoolLiteral.into(), |