Lines Matching refs:spans
374 pub spans: [Span; $len],
379 pub fn $name<S: IntoSpans<[Span; $len]>>(spans: S) -> $name {
381 spans: spans.into_spans(),
388 spans: [Span::call_site(); $len],
447 printing::punct($token, &self.spans, tokens);
456 spans: parsing::punct(input, $token)?,
916 let mut spans = [input.span(); 3]; in punct() localVariable
917 punct_helper(input, token, &mut spans)?; in punct()
918 Ok(S::from_spans(&spans)) in punct()
921 fn punct_helper(input: ParseStream, token: &str, spans: &mut [Span; 3]) -> Result<()> { in punct_helper()
924 assert!(token.len() <= spans.len());
929 spans[i] = punct.span();
943 Err(Error::new(spans[0], format!("expected `{}`", token)))
974 pub fn punct(s: &str, spans: &[Span], tokens: &mut TokenStream) { in punct()
975 assert_eq!(s.len(), spans.len()); in punct()
978 let mut spans = spans.iter(); in punct() localVariable
980 let span = spans.next_back().unwrap(); in punct()
981 for (ch, span) in chars.zip(spans) { in punct()