fix empty record with only comments in it

This commit is contained in:
Sébastien Besnier 2020-12-28 17:37:47 +01:00
parent b1bf03e7a0
commit 2f3d74e8bd
3 changed files with 31 additions and 1 deletions

View file

@ -300,6 +300,15 @@ impl<'a> CommentOrNewline<'a> {
DocComment(_) => true,
}
}
pub fn is_newline(&self) -> bool {
use CommentOrNewline::*;
match self {
Newline => true,
LineComment(_) => false,
DocComment(_) => false,
}
}
}
#[derive(Clone, Debug, PartialEq)]