Lines Matching full:parse

36 //! Keywords and punctuation can be parsed through the [`ParseStream::parse`]
40 //! [`ParseStream::parse`]: crate::parse::ParseBuffer::parse()
47 //! use syn::parse::{Parse, ParseStream};
51 //! // Parse the ItemStatic struct shown above.
52 //! impl Parse for ItemStatic {
53 //! fn parse(input: ParseStream) -> Result<Self> {
55 //! # fn parse(input: ParseStream) -> Result<ItemStatic> {
58 //! vis: input.parse()?,
59 //! static_token: input.parse()?,
60 //! mutability: input.parse()?,
61 //! ident: input.parse()?,
62 //! colon_token: input.parse()?,
63 //! ty: input.parse()?,
64 //! eq_token: input.parse()?,
65 //! expr: input.parse()?,
66 //! semi_token: input.parse()?,
80 //! - [Parsing] — `input.parse::<Token![...]>()?`
88 //! [Peeking]: crate::parse::ParseBuffer::peek()
89 //! [Parsing]: crate::parse::ParseBuffer::parse()
103 use crate::parse::{Parse, ParseStream};
280 impl Parse for $name { impl
281 fn parse(input: ParseStream) -> Result<Self> {
419 impl Parse for $name { impl
420 fn parse(input: ParseStream) -> Result<Self> {
537 impl Parse for Underscore {
538 fn parse(input: ParseStream) -> Result<Self> { in parse() method
809 /// of a `let` statement, or in turbofish for a `parse` function.
813 /// use syn::parse::{Parse, ParseStream, Result};
822 /// impl Parse for UnitStruct {
823 /// fn parse(input: ParseStream) -> Result<Self> {
824 /// let struct_token: Token![struct] = input.parse()?;
825 /// let ident: Ident = input.parse()?;
826 /// let semi_token = input.parse::<Token![;]>()?;
837 /// # use syn::parse::{Parse, ParseStream, Result};
845 /// # impl Parse for UnitStruct {
846 /// # fn parse(input: ParseStream) -> Result<Self> {
860 /// # fn parse(input: ParseStream) -> Result<()> {
862 /// let unit_struct: UnitStruct = input.parse()?;
982 use crate::parse::ParseStream;