From 573700ada4ec2233719b5920c82adc2b7e5d6aee Mon Sep 17 00:00:00 2001 From: Petr Novotnik Date: Wed, 27 May 2026 16:42:49 +0200 Subject: [PATCH 1/2] Expose Parser::into_comments --- src/parser/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From f260d25b167469fb4baa9ad192f4f6d2174e0163 Mon Sep 17 00:00:00 2001 From: Petr Novotnik Date: Thu, 28 May 2026 07:18:36 +0200 Subject: [PATCH 2/2] Expose Comments::offer --- src/ast/comments.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()