mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-23 16:00:10 +00:00
Access non-public group API in a way that makes it more clearly non-public
This commit is contained in:
parent
19b3f0b535
commit
0000e6e911
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user