Preserve trailing statement semicolons when using fmt: skip (#8273)
This commit is contained in:
@@ -473,7 +473,7 @@ pub enum SimpleTokenKind {
|
||||
}
|
||||
|
||||
impl SimpleTokenKind {
|
||||
const fn is_trivia(self) -> bool {
|
||||
pub const fn is_trivia(self) -> bool {
|
||||
matches!(
|
||||
self,
|
||||
SimpleTokenKind::Whitespace
|
||||
@@ -482,6 +482,10 @@ impl SimpleTokenKind {
|
||||
| SimpleTokenKind::Continuation
|
||||
)
|
||||
}
|
||||
|
||||
pub const fn is_comment(self) -> bool {
|
||||
matches!(self, SimpleTokenKind::Comment)
|
||||
}
|
||||
}
|
||||
|
||||
/// Simple zero allocation tokenizer handling most tokens.
|
||||
|
||||
Reference in New Issue
Block a user