Lines Matching full:parse
12 use crate::parse::{Parse, ParseStream, Parser};
84 /// This type does not implement the [`Parse`] trait and thus cannot be
85 /// parsed directly by [`ParseStream::parse`]. Instead use
88 /// which you intend to parse.
90 /// [`Parse`]: crate::parse::Parse
91 /// [`ParseStream::parse`]: crate::parse::ParseBuffer::parse
92 /// [`ParseStream::call`]: crate::parse::ParseBuffer::call
96 /// use syn::parse::{Parse, ParseStream};
109 /// impl Parse for UnitStruct {
110 /// fn parse(input: ParseStream) -> Result<Self> {
113 /// struct_token: input.parse()?,
114 /// name: input.parse()?,
115 /// semi_token: input.parse()?,
129 /// decide whether they recognize it, and then parse the remaining tokens
131 /// attribute. Use [`parse_args()`] to parse those tokens into the expected
192 /// Parse the arguments to the attribute as a syntax tree.
224 pub fn parse_args<T: Parse>(&self) -> Result<T> { in parse_args()
225 self.parse_args_with(T::parse) in parse_args()
228 /// Parse the arguments to the attribute using the given parser.
241 /// // Attribute does not have a Parse impl, so we couldn't directly do:
270 /// Parse the arguments to the attribute, expecting it to follow the
276 /// need to parse arbitrarily goofy attribute syntax.
282 /// We'll parse a struct, and then parse some of Rust's `#[repr]` attribute
316 /// let lit: LitInt = content.parse()?;
327 /// let lit: LitInt = content.parse()?;
572 pub fn parse_args<T: Parse>(&self) -> Result<T> { in parse_args()
573 self.parse_args_with(T::parse) in parse_args()
581 crate::parse::parse_scoped(parser, scope, self.tokens.clone()) in parse_args_with()
654 use crate::parse::discouraged::Speculative as _;
655 use crate::parse::{Parse, ParseStream};
671 pound_token: input.parse()?, in single_parse_inner()
672 style: AttrStyle::Inner(input.parse()?), in single_parse_inner()
674 meta: content.parse()?, in single_parse_inner()
681 pound_token: input.parse()?, in single_parse_outer()
684 meta: content.parse()?, in single_parse_outer()
689 impl Parse for Meta {
690 fn parse(input: ParseStream) -> Result<Self> { in parse() method
697 impl Parse for MetaList {
698 fn parse(input: ParseStream) -> Result<Self> { in parse() method
705 impl Parse for MetaNameValue {
706 fn parse(input: ParseStream) -> Result<Self> { in parse() method
716 let unsafe_token: Token![unsafe] = input.parse()?; in parse_outermost_meta_path()
743 let eq_token: Token![=] = input.parse()?; in parse_meta_name_value_after_path()
745 let lit: Option<Lit> = ahead.parse()?; in parse_meta_name_value_after_path()
755 input.parse()? in parse_meta_name_value_after_path()