Address comments

This commit is contained in:
hi-rustin 2021-05-14 17:30:00 +08:00
parent b98c119ba6
commit 765ccf2eca
3 changed files with 25 additions and 3 deletions

View file

@ -227,8 +227,8 @@ pub(super) fn element(
k if k.is_keyword() => {
let h = Highlight::new(HlTag::Keyword);
match k {
T![await]
| T![break]
T![await] => h | HlMod::Async | HlMod::ControlFlow,
T![break]
| T![continue]
| T![else]
| T![if]
@ -255,7 +255,7 @@ pub(super) fn element(
})
.map(|modifier| h | modifier)
.unwrap_or(h),
T![async] | T![await] => h | HlMod::Async,
T![async] => h | HlMod::Async,
_ => h,
}
}