Skip to content

Commit b6af2ae

Browse files
authored
Expose Parser::into_comments (apache#2354)
1 parent 8c3f7fc commit b6af2ae

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/ast/comments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl Comments {
3333
/// last accepted comment. In other words, this method will skip the
3434
/// comment if its comming out of order (as encountered in the parsed
3535
/// source code.)
36-
pub(crate) fn offer(&mut self, comment: CommentWithSpan) {
36+
pub fn offer(&mut self, comment: CommentWithSpan) {
3737
if self
3838
.0
3939
.last()

src/parser/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ impl<'a> Parser<'a> {
559559
}
560560

561561
/// Consumes this parser returning comments from the parsed token stream.
562-
fn into_comments(self) -> comments::Comments {
562+
pub fn into_comments(self) -> comments::Comments {
563563
let mut comments = comments::Comments::default();
564564
for t in self.tokens.into_iter() {
565565
match t.token {

0 commit comments

Comments
 (0)