mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Tag yield
and await
as ControlFlow in semantic highlighting
This commit is contained in:
parent
85bab7539a
commit
c005ce60a0
2 changed files with 13 additions and 5 deletions
|
@ -254,15 +254,17 @@ pub(super) fn element(
|
|||
k if k.is_keyword() => {
|
||||
let h = Highlight::new(HlTag::Keyword);
|
||||
match k {
|
||||
T![break]
|
||||
T![await]
|
||||
| T![break]
|
||||
| T![continue]
|
||||
| T![else]
|
||||
| T![if]
|
||||
| T![in]
|
||||
| T![loop]
|
||||
| T![match]
|
||||
| T![return]
|
||||
| T![while]
|
||||
| T![in] => h | HlMod::ControlFlow,
|
||||
| T![yield] => h | HlMod::ControlFlow,
|
||||
T![for] if !is_child_of_impl(&element) => h | HlMod::ControlFlow,
|
||||
T![unsafe] => h | HlMod::Unsafe,
|
||||
T![true] | T![false] => HlTag::BoolLiteral.into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue