pub mod attribute;
pub mod compilation_unit;
pub mod expr;
pub mod generics;
pub mod item;
pub mod lit;
pub mod op;
pub mod pat;
pub mod path;
pub mod stmt;
pub mod ty;
use crate::span::Span;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Comment {
pub kind: CommentKind,
pub span: Span,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum CommentKind {
Line,
Block,
DocLine,
DocBlock,
}
impl Comment {
pub fn text<'a>(&self, source: &'a str) -> &'a str {
&source[self.span.range()]
}
}
pub use attribute::*;
pub use compilation_unit::*;
pub use expr::*;
pub use generics::*;
pub use item::*;
pub use lit::*;
pub use op::*;
pub use pat::*;
pub use path::*;
pub use stmt::*;
pub use ty::*;