Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/token_ext.rs')
-rw-r--r--crates/syntax/src/ast/token_ext.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/token_ext.rs b/crates/syntax/src/ast/token_ext.rs
index c32ab686cc..cc7e5150b3 100644
--- a/crates/syntax/src/ast/token_ext.rs
+++ b/crates/syntax/src/ast/token_ext.rs
@@ -14,6 +14,10 @@ impl ast::Comment {
CommentKind::from_text(self.text())
}
+ pub fn is_doc(&self) -> bool {
+ self.kind().doc.is_some()
+ }
+
pub fn is_inner(&self) -> bool {
self.kind().doc == Some(CommentPlacement::Inner)
}