pub trait ParseMore: Sized {
// Required method
fn parse(input: ParseStream<'_>) -> Result<Self>;
}
Expand description
Parsing interface implemented by all types from the syn crate which already implement syn::parse::Parse, and some others usefull ones. Use the parse_more_auto_impl macros to easily implement ParseMore on a type which already implement syn::parse::Parse.
Required Methods§
fn parse(input: ParseStream<'_>) -> Result<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl ParseMore for PointerMutability
impl ParseMore for PointerMutability
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for RangeLimits
impl ParseMore for RangeLimits
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for CapturedParam
impl ParseMore for CapturedParam
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for GenericParam
impl ParseMore for GenericParam
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TraitBoundModifier
impl ParseMore for TraitBoundModifier
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TypeParamBound
impl ParseMore for TypeParamBound
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for WherePredicate
impl ParseMore for WherePredicate
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ForeignItem
impl ParseMore for ForeignItem
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for StaticMutability
impl ParseMore for StaticMutability
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for GenericArgument
impl ParseMore for GenericArgument
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for Visibility
impl ParseMore for Visibility
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ReturnType
impl ParseMore for ReturnType
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TokenStream
impl ParseMore for TokenStream
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for MetaNameValue
impl ParseMore for MetaNameValue
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for FieldsNamed
impl ParseMore for FieldsNamed
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for FieldsUnnamed
impl ParseMore for FieldsUnnamed
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for DeriveInput
impl ParseMore for DeriveInput
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprAssign
impl ParseMore for ExprAssign
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprBinary
impl ParseMore for ExprBinary
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprClosure
impl ParseMore for ExprClosure
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprContinue
impl ParseMore for ExprContinue
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprForLoop
impl ParseMore for ExprForLoop
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprMethodCall
impl ParseMore for ExprMethodCall
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprRawAddr
impl ParseMore for ExprRawAddr
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprReference
impl ParseMore for ExprReference
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprRepeat
impl ParseMore for ExprRepeat
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprReturn
impl ParseMore for ExprReturn
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprStruct
impl ParseMore for ExprStruct
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprTryBlock
impl ParseMore for ExprTryBlock
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ExprUnsafe
impl ParseMore for ExprUnsafe
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for FieldValue
impl ParseMore for FieldValue
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for BoundLifetimes
impl ParseMore for BoundLifetimes
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ConstParam
impl ParseMore for ConstParam
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for LifetimeParam
impl ParseMore for LifetimeParam
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for PreciseCapture
impl ParseMore for PreciseCapture
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TraitBound
impl ParseMore for TraitBound
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for WhereClause
impl ParseMore for WhereClause
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ForeignItemFn
impl ParseMore for ForeignItemFn
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ForeignItemMacro
impl ParseMore for ForeignItemMacro
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ForeignItemStatic
impl ParseMore for ForeignItemStatic
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ForeignItemType
impl ParseMore for ForeignItemType
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ImplItemConst
impl ParseMore for ImplItemConst
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ImplItemFn
impl ParseMore for ImplItemFn
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ImplItemMacro
impl ParseMore for ImplItemMacro
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ImplItemType
impl ParseMore for ImplItemType
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ItemExternCrate
impl ParseMore for ItemExternCrate
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ItemForeignMod
impl ParseMore for ItemForeignMod
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ItemStatic
impl ParseMore for ItemStatic
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ItemStruct
impl ParseMore for ItemStruct
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ItemTraitAlias
impl ParseMore for ItemTraitAlias
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TraitItemConst
impl ParseMore for TraitItemConst
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TraitItemFn
impl ParseMore for TraitItemFn
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TraitItemMacro
impl ParseMore for TraitItemMacro
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TraitItemType
impl ParseMore for TraitItemType
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for LitByteStr
impl ParseMore for LitByteStr
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for AngleBracketedGenericArguments
impl ParseMore for AngleBracketedGenericArguments
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for ParenthesizedGenericArguments
impl ParseMore for ParenthesizedGenericArguments
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for PathSegment
impl ParseMore for PathSegment
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for Underscore
impl ParseMore for Underscore
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TypeBareFn
impl ParseMore for TypeBareFn
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TypeImplTrait
impl ParseMore for TypeImplTrait
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TypeReference
impl ParseMore for TypeReference
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ParseMore for TypeTraitObject
impl ParseMore for TypeTraitObject
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<A: ParseMore, B: ParseMore, C: ParseMore, D: ParseMore, E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<A: ParseMore, B: ParseMore, C: ParseMore, D: ParseMore, E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<B: ParseMore, C: ParseMore, D: ParseMore, E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<B: ParseMore, C: ParseMore, D: ParseMore, E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<C: ParseMore, D: ParseMore, E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<C: ParseMore, D: ParseMore, E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<D: ParseMore, E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<D: ParseMore, E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<E: ParseMore, F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<F: ParseMore, G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<G: ParseMore, H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (H, I, J, K, L, M, N, O, P, Q, R, S, T)
impl<H: ParseMore, I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (H, I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (I, J, K, L, M, N, O, P, Q, R, S, T)
impl<I: ParseMore, J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (I, J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (J, K, L, M, N, O, P, Q, R, S, T)
impl<J: ParseMore, K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (J, K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (K, L, M, N, O, P, Q, R, S, T)
impl<K: ParseMore, L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (K, L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (L, M, N, O, P, Q, R, S, T)
impl<L: ParseMore, M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (L, M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (M, N, O, P, Q, R, S, T)
impl<M: ParseMore, N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (M, N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (N, O, P, Q, R, S, T)
impl<N: ParseMore, O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (N, O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (O, P, Q, R, S, T)
impl<O: ParseMore, P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (O, P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (P, Q, R, S, T)
impl<P: ParseMore, Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (P, Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (Q, R, S, T)
impl<Q: ParseMore, R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (Q, R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (R, S, T)
impl<R: ParseMore, S: ParseMore, T: ParseMore> ParseMore for (R, S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<S: ParseMore, T: ParseMore> ParseMore for (S, T)
impl<S: ParseMore, T: ParseMore> ParseMore for (S, T)
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<T: ParseMore> ParseMore for Option<T>
impl<T: ParseMore> ParseMore for Option<T>
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<T: ParseMore> ParseMore for Box<T>
impl<T: ParseMore> ParseMore for Box<T>
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<T: ParseMore> ParseMore for Vec<T>
Implement ParseMore for the Vec type, with a behaviour similar to syn::punctuated::Punctuated<T, syn::parse::Nothing>
impl<T: ParseMore> ParseMore for Vec<T>
Implement ParseMore for the Vec type, with a behaviour similar to syn::punctuated::Punctuated<T, syn::parse::Nothing>
use quote::quote;
use parse_more::parse_more_macro_input;
use proc_macro::TokenStream;
use syn::Ident;
#[proc_macro]
pub fn identifiers_sum(input: TokenStream) -> TokenStream {
let idents = parse_more_macro_input!(input as Vec<Ident>);
idents.into_iter().map(|ident| quote! {
#ident
}).collect::<proc_macro2::TokenStream>().into()
}
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<T: ParseMore, P: ParseMore> ParseMore for Punctuated<T, P>
Implement ParseMore for the syn::punctuated::Punctuated type.
impl<T: ParseMore, P: ParseMore> ParseMore for Punctuated<T, P>
Implement ParseMore for the syn::punctuated::Punctuated type.
use quote::quote;
use parse_more::parse_more_macro_input;
use proc_macro::TokenStream;
use syn::{Ident, Token, punctuated::Punctuated};
#[proc_macro]
pub fn identifiers_sum(input: TokenStream) -> TokenStream {
let idents = parse_more_macro_input!(input as Punctuated<Ident, Token![,]>);
idents.into_iter().map(|ident| quote! {
#ident
}).collect::<proc_macro2::TokenStream>().into()
}
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<T: ParseMore, const N: usize> ParseMore for [T; N]
Implement ParseMore for the array type.
impl<T: ParseMore, const N: usize> ParseMore for [T; N]
Implement ParseMore for the array type.
use quote::quote;
use parse_more::parse_more_macro_input;
use proc_macro::TokenStream;
use syn::{Ident, Token};
#[proc_macro]
pub fn identifiers_sum(input: TokenStream) -> TokenStream {
let idents = parse_more_macro_input!(input as [Ident; 3]);
let [a, b, c] = idents;
quote! {
#a + #b + #c
}.into()
}
fn parse(input: ParseStream<'_>) -> Result<Self>
Implementors§
impl ParseMore for Invalid
impl<A: ParseMore, B: ParseMore, C: ParseMore, D: ParseMore> ParseMore for Either<A, B, C, D>
impl<A: ParseMore, B: ParseMore, C: ParseMore, D: ParseMore> ParseMore for Concat<A, B, C, D>
impl<T: ParseMore> ParseMore for Braced<T>
impl<T: ParseMore> ParseMore for Bracketed<T>
impl<T: ParseMore> ParseMore for Parenthesized<T>
Imlement ParseMore for the Parenthesized type.