Lines Matching full:parse
7 use crate::parse::{inner_unexpected, ParseBuffer, Unexpected};
16 /// Advance this parse stream to the position of a forked parse stream.
19 /// parse stream, perform some speculative parsing, then join the original
24 /// generate useful errors. That said, it is often the only way to parse
26 /// is that when the fork fails to parse an `A`, it's impossible to tell
49 /// `advance_to`, we can avoid having to parse the speculatively parsed
53 /// `Parse` implementation for `PathSegment`:
57 /// use syn::parse::discouraged::Speculative;
58 /// # use syn::parse::{Parse, ParseStream};
78 /// impl Parse for PathSegment {
79 /// fn parse(input: ParseStream) -> Result<Self> {
89 /// let ident = input.parse()?;
93 /// arguments: PathArguments::AngleBracketed(input.parse()?),
98 /// if let Ok(arguments) = fork.parse() {
116 /// presentation. Even if the lookahead is the "correct" parse, the error
117 /// that is shown is that of the "fallback" parse. To use the same example
135 /// assuming that the `<` is a less-than when it fails to parse the generic
148 /// forks' parse errors, or show the one that consumed more tokens), but
172 panic!("fork was not derived from the advancing parse stream"); in advance_to()
218 let nested = crate::parse::advance_step_cursor(cursor, content); in parse_any_delimiter()
219 let unexpected = crate::parse::get_unexpected(self); in parse_any_delimiter()
220 let content = crate::parse::new_parse_buffer(scope, nested, unexpected); in parse_any_delimiter()