Lines Matching refs:token

204     ($($token:literal pub struct $name:ident)*) => {
206 #[doc = concat!('`', $token, '`')]
274 printing::keyword($token, self.span, tokens);
283 span: parsing::keyword(input, $token)?,
291 parsing::peek_keyword(cursor, $token)
295 concat!("`", $token, "`")
326 ($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => {
330 #[doc = concat!('`', $token, '`')]
403 ($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => {
406 $token pub struct $name/$len #[doc = $usage]
413 printing::punct($token, &self.spans, tokens);
422 spans: parsing::punct(input, $token)?,
430 parsing::peek_punct(cursor, $token)
434 concat!("`", $token, "`")
874 [abstract] => { $crate::token::Abstract };
875 [as] => { $crate::token::As };
876 [async] => { $crate::token::Async };
877 [auto] => { $crate::token::Auto };
878 [await] => { $crate::token::Await };
879 [become] => { $crate::token::Become };
880 [box] => { $crate::token::Box };
881 [break] => { $crate::token::Break };
882 [const] => { $crate::token::Const };
883 [continue] => { $crate::token::Continue };
884 [crate] => { $crate::token::Crate };
885 [default] => { $crate::token::Default };
886 [do] => { $crate::token::Do };
887 [dyn] => { $crate::token::Dyn };
888 [else] => { $crate::token::Else };
889 [enum] => { $crate::token::Enum };
890 [extern] => { $crate::token::Extern };
891 [final] => { $crate::token::Final };
892 [fn] => { $crate::token::Fn };
893 [for] => { $crate::token::For };
894 [if] => { $crate::token::If };
895 [impl] => { $crate::token::Impl };
896 [in] => { $crate::token::In };
897 [let] => { $crate::token::Let };
898 [loop] => { $crate::token::Loop };
899 [macro] => { $crate::token::Macro };
900 [match] => { $crate::token::Match };
901 [mod] => { $crate::token::Mod };
902 [move] => { $crate::token::Move };
903 [mut] => { $crate::token::Mut };
904 [override] => { $crate::token::Override };
905 [priv] => { $crate::token::Priv };
906 [pub] => { $crate::token::Pub };
907 [raw] => { $crate::token::Raw };
908 [ref] => { $crate::token::Ref };
909 [return] => { $crate::token::Return };
910 [Self] => { $crate::token::SelfType };
911 [self] => { $crate::token::SelfValue };
912 [static] => { $crate::token::Static };
913 [struct] => { $crate::token::Struct };
914 [super] => { $crate::token::Super };
915 [trait] => { $crate::token::Trait };
916 [try] => { $crate::token::Try };
917 [type] => { $crate::token::Type };
918 [typeof] => { $crate::token::Typeof };
919 [union] => { $crate::token::Union };
920 [unsafe] => { $crate::token::Unsafe };
921 [unsized] => { $crate::token::Unsized };
922 [use] => { $crate::token::Use };
923 [virtual] => { $crate::token::Virtual };
924 [where] => { $crate::token::Where };
925 [while] => { $crate::token::While };
926 [yield] => { $crate::token::Yield };
927 [&] => { $crate::token::And };
928 [&&] => { $crate::token::AndAnd };
929 [&=] => { $crate::token::AndEq };
930 [@] => { $crate::token::At };
931 [^] => { $crate::token::Caret };
932 [^=] => { $crate::token::CaretEq };
933 [:] => { $crate::token::Colon };
934 [,] => { $crate::token::Comma };
935 [$] => { $crate::token::Dollar };
936 [.] => { $crate::token::Dot };
937 [..] => { $crate::token::DotDot };
938 [...] => { $crate::token::DotDotDot };
939 [..=] => { $crate::token::DotDotEq };
940 [=] => { $crate::token::Eq };
941 [==] => { $crate::token::EqEq };
942 [=>] => { $crate::token::FatArrow };
943 [>=] => { $crate::token::Ge };
944 [>] => { $crate::token::Gt };
945 [<-] => { $crate::token::LArrow };
946 [<=] => { $crate::token::Le };
947 [<] => { $crate::token::Lt };
948 [-] => { $crate::token::Minus };
949 [-=] => { $crate::token::MinusEq };
950 [!=] => { $crate::token::Ne };
951 [!] => { $crate::token::Not };
952 [|] => { $crate::token::Or };
953 [|=] => { $crate::token::OrEq };
954 [||] => { $crate::token::OrOr };
955 [::] => { $crate::token::PathSep };
956 [%] => { $crate::token::Percent };
957 [%=] => { $crate::token::PercentEq };
958 [+] => { $crate::token::Plus };
959 [+=] => { $crate::token::PlusEq };
960 [#] => { $crate::token::Pound };
961 [?] => { $crate::token::Question };
962 [->] => { $crate::token::RArrow };
963 [;] => { $crate::token::Semi };
964 [<<] => { $crate::token::Shl };
965 [<<=] => { $crate::token::ShlEq };
966 [>>] => { $crate::token::Shr };
967 [>>=] => { $crate::token::ShrEq };
968 [/] => { $crate::token::Slash };
969 [/=] => { $crate::token::SlashEq };
970 [*] => { $crate::token::Star };
971 [*=] => { $crate::token::StarEq };
972 [~] => { $crate::token::Tilde };
973 [_] => { $crate::token::Underscore };
985 pub(crate) fn keyword(input: ParseStream, token: &str) -> Result<Span> { in keyword()
988 if ident == token { in keyword()
992 Err(cursor.error(format!("expected `{}`", token))) in keyword()
996 pub(crate) fn peek_keyword(cursor: Cursor, token: &str) -> bool { in peek_keyword()
998 ident == token in peek_keyword()
1005 pub fn punct<const N: usize>(input: ParseStream, token: &str) -> Result<[Span; N]> { in punct()
1007 punct_helper(input, token, &mut spans)?;
1011 fn punct_helper(input: ParseStream, token: &str, spans: &mut [Span]) -> Result<()> { in punct_helper()
1014 assert_eq!(token.len(), spans.len()); in punct_helper()
1016 for (i, ch) in token.chars().enumerate() { in punct_helper()
1022 } else if i == token.len() - 1 { in punct_helper()
1033 Err(Error::new(spans[0], format!("expected `{}`", token))) in punct_helper()
1038 pub fn peek_punct(mut cursor: Cursor, token: &str) -> bool { in peek_punct()
1039 for (i, ch) in token.chars().enumerate() { in peek_punct()
1044 } else if i == token.len() - 1 { in peek_punct()