You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/05/28 11:26:34 UTC

(datafusion-sqlparser-rs) branch main updated: Expose Parser::into_comments (#2354)

This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new b6af2aea Expose Parser::into_comments (#2354)
b6af2aea is described below

commit b6af2aead6c611a34fed9c24943629753c0a6df0
Author: xitep <xi...@users.noreply.github.com>
AuthorDate: Thu May 28 12:51:11 2026 +0200

    Expose Parser::into_comments (#2354)
---
 src/ast/comments.rs | 2 +-
 src/parser/mod.rs   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ast/comments.rs b/src/ast/comments.rs
index 7744c89e..d48e4f5b 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 cbd315e9..3c618519 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 {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org