diff --git a/src/export.rs b/src/export.rs index d3a087841..f478d091e 100644 --- a/src/export.rs +++ b/src/export.rs @@ -12,6 +12,9 @@ pub extern crate quote; pub use proc_macro2::{Span, TokenStream as TokenStream2}; +#[cfg(feature = "parsing")] +pub use crate::group::{parse_braces, parse_brackets, parse_parens}; + pub use crate::span::IntoSpans; #[cfg(all( diff --git a/src/group.rs b/src/group.rs index 6b0571015..7fd273c1d 100644 --- a/src/group.rs +++ b/src/group.rs @@ -136,7 +136,7 @@ fn parse_delimited<'a>( #[cfg_attr(doc_cfg, doc(cfg(feature = "parsing")))] macro_rules! parenthesized { ($content:ident in $cursor:expr) => { - match $crate::group::parse_parens(&$cursor) { + match $crate::__private::parse_parens(&$cursor) { $crate::__private::Ok(parens) => { $content = parens.content; parens.token @@ -214,7 +214,7 @@ macro_rules! parenthesized { #[cfg_attr(doc_cfg, doc(cfg(feature = "parsing")))] macro_rules! braced { ($content:ident in $cursor:expr) => { - match $crate::group::parse_braces(&$cursor) { + match $crate::__private::parse_braces(&$cursor) { $crate::__private::Ok(braces) => { $content = braces.content; braces.token @@ -269,7 +269,7 @@ macro_rules! braced { #[cfg_attr(doc_cfg, doc(cfg(feature = "parsing")))] macro_rules! bracketed { ($content:ident in $cursor:expr) => { - match $crate::group::parse_brackets(&$cursor) { + match $crate::__private::parse_brackets(&$cursor) { $crate::__private::Ok(brackets) => { $content = brackets.content; brackets.token diff --git a/src/lib.rs b/src/lib.rs index 0ef3626fd..1d252fc58 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -299,11 +299,9 @@ extern crate quote; #[macro_use] mod macros; -// Not public API. #[cfg(feature = "parsing")] -#[doc(hidden)] #[macro_use] -pub mod group; +mod group; #[macro_use] pub mod token;