Complete semicolon when needed

This commit is contained in:
Kirill Bulatov 2020-09-08 01:24:16 +03:00
parent 57a260f579
commit 9fb83211f9
6 changed files with 30 additions and 26 deletions

View file

@ -116,15 +116,6 @@ pub(crate) fn if_is_prev(element: SyntaxElement) -> bool {
.is_some()
}
// TODO kb generify?
pub(crate) fn mod_is_prev(element: SyntaxElement) -> bool {
element
.into_token()
.and_then(|it| previous_non_trivia_token(it))
.filter(|it| it.kind() == MOD_KW)
.is_some()
}
#[test]
fn test_if_is_prev() {
check_pattern_is_applicable(r"if l<|>", if_is_prev);