mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-17 17:10:28 +00:00
Better interface for doc comment and attribute processing
This commit is contained in:
parent
69dbfc7754
commit
08adce61a1
5 changed files with 66 additions and 64 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue