diff --git a/src/ast/comments.rs b/src/ast/comments.rs index 7744c89e2..d48e4f5be 100644 --- a/src/ast/comments.rs +++ b/src/ast/comments.rs @@ -33,7 +33,7 @@ impl Comments { /// last accepted comment. In other words, this method will skip the /// comment if its comming out of order (as encountered in the parsed /// source code.) - pub(crate) fn offer(&mut self, comment: CommentWithSpan) { + pub fn offer(&mut self, comment: CommentWithSpan) { if self .0 .last() diff --git a/src/parser/mod.rs b/src/parser/mod.rs index cbd315e92..3c6185193 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -559,7 +559,7 @@ impl<'a> Parser<'a> { } /// Consumes this parser returning comments from the parsed token stream. - fn into_comments(self) -> comments::Comments { + pub fn into_comments(self) -> comments::Comments { let mut comments = comments::Comments::default(); for t in self.tokens.into_iter() { match t.token {