pub struct Comment {
pub marker: CommentMarker,
pub text: String,
pub span: SourceSpan,
}Expand description
A source comment captured by the lexer. Comments are kept out of the token
stream (so the parser is unaffected) but retained here so tooling — whip fmt,
the LSP — can preserve them. text is the trimmed content after the marker;
span covers the marker through end of line (exclusive of the newline).
Fields§
§marker: CommentMarker§text: String§span: SourceSpanTrait Implementations§
impl Eq for Comment
impl StructuralPartialEq for Comment
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnsafeUnpin for Comment
impl UnwindSafe for Comment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more