Don't export private things
This commit is contained in:
parent
6b18cf0e20
commit
10e06be15a
@ -9,7 +9,7 @@
|
||||
/// configuration values. This struct parses them all in one go and then they
|
||||
/// get processed by their respective use sites.
|
||||
#[derive(Default, Debug)]
|
||||
pub struct Comments {
|
||||
pub(crate) struct Comments {
|
||||
/// List of revision names to execute. Can only be speicified once
|
||||
pub revisions: Option<Vec<String>>,
|
||||
/// Don't run this test if any of these filters apply
|
||||
@ -30,21 +30,21 @@ pub struct Comments {
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ErrorMatch {
|
||||
pub(crate) struct ErrorMatch {
|
||||
pub matched: String,
|
||||
pub revision: Option<String>,
|
||||
pub definition_line: usize,
|
||||
}
|
||||
|
||||
impl Comments {
|
||||
pub fn parse_file(path: &Path) -> Self {
|
||||
pub(crate) fn parse_file(path: &Path) -> Self {
|
||||
let content = std::fs::read_to_string(path).unwrap();
|
||||
Self::parse(path, &content)
|
||||
}
|
||||
|
||||
/// Parse comments in `content`.
|
||||
/// `path` is only used to emit diagnostics if parsing fails.
|
||||
pub fn parse(path: &Path, content: &str) -> Self {
|
||||
pub(crate) fn parse(path: &Path, content: &str) -> Self {
|
||||
let mut this = Self::default();
|
||||
let error_pattern_regex =
|
||||
Regex::new(r"//(\[(?P<revision>[^\]]+)\])?~[|^]*\s*(ERROR|HELP|WARN)?:?(?P<text>.*)")
|
||||
|
@ -9,7 +9,7 @@
|
||||
use crossbeam::queue::SegQueue;
|
||||
use regex::Regex;
|
||||
|
||||
pub use crate::comments::Comments;
|
||||
use crate::comments::Comments;
|
||||
|
||||
mod comments;
|
||||
#[cfg(test)]
|
||||
|
Loading…
Reference in New Issue
Block a user