Lines Matching +full:all +full:- +full:impls
10 #[cfg(feature = "extra-traits")]
21 /// [syntax tree enum]: crate::Expr#syntax-tree-enums
24 /// A UTF-8 string literal: `"foo"`.
53 /// A UTF-8 string literal: `"foo"`.
122 pub fn new(value: &str, span: Span) -> Self { in new()
133 pub fn value(&self) -> String { in value()
141 /// All spans in the syntax tree will point to the span of this `LitStr`.
153 /// fn get_path(attr: &Attribute) -> Result<Option<Path>> {
172 pub fn parse<T: Parse>(&self) -> Result<T> { in parse()
178 /// All spans in the syntax tree will point to the span of this `LitStr`.
186 /// # fn main() -> Result<()> {
202 pub fn parse_with<F: Parser>(&self, parser: F) -> Result<F::Output> { in parse_with()
206 fn respan_token_stream(stream: TokenStream, span: Span) -> TokenStream { in parse_with()
214 fn respan_token_tree(mut token: TokenTree, span: Span) -> TokenTree { in parse_with()
244 pub fn span(&self) -> Span { in span()
252 pub fn suffix(&self) -> &str { in suffix()
256 pub fn token(&self) -> Literal { in token()
262 pub fn new(value: &[u8], span: Span) -> Self { in new()
273 pub fn value(&self) -> Vec<u8> { in value()
279 pub fn span(&self) -> Span { in span()
287 pub fn suffix(&self) -> &str { in suffix()
291 pub fn token(&self) -> Literal { in token()
297 pub fn new(value: u8, span: Span) -> Self { in new()
308 pub fn value(&self) -> u8 { in value()
314 pub fn span(&self) -> Span { in span()
322 pub fn suffix(&self) -> &str { in suffix()
326 pub fn token(&self) -> Literal { in token()
332 pub fn new(value: char, span: Span) -> Self { in new()
343 pub fn value(&self) -> char { in value()
349 pub fn span(&self) -> Span { in span()
357 pub fn suffix(&self) -> &str { in suffix()
361 pub fn token(&self) -> Literal { in token()
367 pub fn new(repr: &str, span: Span) -> Self { in new()
384 pub fn base10_digits(&self) -> &str { in base10_digits()
403 /// fn parse(input: ParseStream) -> Result<Self> {
410 pub fn base10_parse<N>(&self) -> Result<N> in base10_parse()
420 pub fn suffix(&self) -> &str { in suffix()
424 pub fn span(&self) -> Span { in span()
432 pub fn token(&self) -> Literal { in token()
438 fn from(token: Literal) -> Self { in from()
455 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
461 pub fn new(repr: &str, span: Span) -> Self { in new()
478 pub fn base10_digits(&self) -> &str { in base10_digits()
482 pub fn base10_parse<N>(&self) -> Result<N> in base10_parse()
492 pub fn suffix(&self) -> &str { in suffix()
496 pub fn span(&self) -> Span { in span()
504 pub fn token(&self) -> Literal { in token()
510 fn from(token: Literal) -> Self { in from()
527 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
533 pub fn new(value: bool, span: Span) -> Self { in new()
537 pub fn value(&self) -> bool { in value()
541 pub fn span(&self) -> Span { in span()
549 pub fn token(&self) -> Ident { in token()
555 #[cfg(feature = "extra-traits")]
560 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
562 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
568 ) -> fmt::Result { in fmt()
579 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
581 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
587 ) -> fmt::Result { in fmt()
598 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
600 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
606 ) -> fmt::Result { in fmt()
617 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
619 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
625 ) -> fmt::Result { in fmt()
636 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
638 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
644 ) -> fmt::Result { in fmt()
655 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
657 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
663 ) -> fmt::Result { in fmt()
674 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
676 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
682 ) -> fmt::Result { in fmt()
694 #[cfg(feature = "clone-impls")]
695 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
697 fn clone(&self) -> Self { in clone()
705 #[cfg(feature = "clone-impls")]
706 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
708 fn clone(&self) -> Self { in clone()
717 #[cfg(feature = "clone-impls")]
718 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
720 fn clone(&self) -> Self { in clone()
731 #[cfg(feature = "clone-impls")]
732 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
734 fn clone(&self) -> Self {
741 #[cfg(feature = "extra-traits")]
742 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
744 fn eq(&self, other: &Self) -> bool {
749 #[cfg(feature = "extra-traits")]
750 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
764 pub fn $ty(marker: lookahead::TokenMarker) -> $ty {
782 pub fn LitBool(marker: lookahead::TokenMarker) -> LitBool {
803 pub fn Lit(marker: lookahead::TokenMarker) -> Lit {
817 fn parse(input: ParseStream) -> Result<Self> { in parse()
835 if punct.as_char() == '-' { in parse()
847 fn parse_negative_lit(neg: Punct, cursor: Cursor) -> Option<(Lit, Cursor)> { in parse_negative_lit()
854 repr.insert(0, '-'); in parse_negative_lit()
888 fn parse(input: ParseStream) -> Result<Self> { in parse()
899 fn parse(input: ParseStream) -> Result<Self> { in parse()
910 fn parse(input: ParseStream) -> Result<Self> { in parse()
921 fn parse(input: ParseStream) -> Result<Self> { in parse()
932 fn parse(input: ParseStream) -> Result<Self> { in parse()
943 fn parse(input: ParseStream) -> Result<Self> { in parse()
954 fn parse(input: ParseStream) -> Result<Self> { in parse()
1027 /// Interpret a Syn literal from a proc-macro2 literal.
1028 pub fn new(token: Literal) -> Self { in new()
1063 b'0'..=b'9' | b'-' => { in new()
1074 // 1.0, 1e-1, 1e+1 in new()
1104 pub fn suffix(&self) -> &str { in suffix()
1116 pub fn span(&self) -> Span { in span()
1145 pub(crate) fn byte<S: AsRef<[u8]> + ?Sized>(s: &S, idx: usize) -> u8 { in byte()
1154 fn next_chr(s: &str) -> char { in next_chr()
1159 pub(crate) fn parse_lit_str(s: &str) -> (Box<str>, Box<str>) { in parse_lit_str()
1168 // https://github.com/rust-lang-nursery/rust-clippy/issues/2329
1170 fn parse_lit_str_cooked(mut s: &str) -> (Box<str>, Box<str>) { in parse_lit_str_cooked()
1230 fn parse_lit_str_raw(mut s: &str) -> (Box<str>, Box<str>) { in parse_lit_str_raw()
1250 pub(crate) fn parse_lit_byte_str(s: &str) -> (Vec<u8>, Box<str>) { in parse_lit_byte_str()
1260 // https://github.com/rust-lang-nursery/rust-clippy/issues/2329
1262 fn parse_lit_byte_str_cooked(mut s: &str) -> (Vec<u8>, Box<str>) { in parse_lit_byte_str_cooked()
1315 let suffix = s[s.len() - v.len() + 1..].to_owned().into_boxed_str(); in parse_lit_byte_str_cooked()
1319 fn parse_lit_byte_str_raw(s: &str) -> (Vec<u8>, Box<str>) { in parse_lit_byte_str_raw()
1326 pub(crate) fn parse_lit_byte(s: &str) -> (u8, Box<str>) { in parse_lit_byte()
1360 let suffix = s[s.len() - v.len() + 1..].to_owned().into_boxed_str(); in parse_lit_byte()
1365 pub(crate) fn parse_lit_char(mut s: &str) -> (char, Box<str>) { in parse_lit_char()
1406 fn backslash_x<S>(s: &S) -> (u8, &S) in backslash_x()
1415 b'0'..=b'9' => b0 - b'0', in backslash_x()
1416 b'a'..=b'f' => 10 + (b0 - b'a'), in backslash_x()
1417 b'A'..=b'F' => 10 + (b0 - b'A'), in backslash_x()
1418 _ => panic!("unexpected non-hex character after \\x"), in backslash_x()
1421 b'0'..=b'9' => b1 - b'0', in backslash_x()
1422 b'a'..=b'f' => 10 + (b1 - b'a'), in backslash_x()
1423 b'A'..=b'F' => 10 + (b1 - b'A'), in backslash_x()
1424 _ => panic!("unexpected non-hex character after \\x"), in backslash_x()
1429 fn backslash_u(mut s: &str) -> (char, &str) { in backslash_u()
1440 b'0'..=b'9' => b - b'0', in backslash_u()
1441 b'a'..=b'f' => 10 + b - b'a', in backslash_u()
1442 b'A'..=b'F' => 10 + b - b'A', in backslash_u()
1449 _ => panic!("unexpected non-hex character after \\u"), in backslash_u()
1470 pub(crate) fn parse_lit_int(mut s: &str) -> Option<(Box<str>, Box<str>)> { in parse_lit_int()
1471 let negative = byte(s, 0) == b'-'; in parse_lit_int()
1498 b'0'..=b'9' => b - b'0', in parse_lit_int()
1499 b'a'..=b'f' if base > 10 => b - b'a' + 10, in parse_lit_int()
1500 b'A'..=b'F' if base > 10 => b - b'A' + 10, in parse_lit_int()
1513 b'-' | b'+' => return None, in parse_lit_int()
1552 repr.insert(0, '-'); in parse_lit_int()
1561 pub(crate) fn parse_lit_float(input: &str) -> Option<(Box<str>, Box<str>)> { in parse_lit_float()
1568 let start = (*bytes.first()? == b'-') as usize; in parse_lit_float()
1606 b'-' | b'+' | b'0'..=b'9' => {} in parse_lit_float()
1619 b'-' | b'+' => { in parse_lit_float()
1624 if bytes[read] == b'-' { in parse_lit_float()