Lines Matching refs:tokens

733         fn to_tokens(&self, tokens: &mut TokenStream) {  in to_tokens()
734 print_path(tokens, self, PathStyle::AsWritten); in to_tokens()
738 pub(crate) fn print_path(tokens: &mut TokenStream, path: &Path, style: PathStyle) { in print_path()
739 path.leading_colon.to_tokens(tokens); in print_path()
741 print_path_segment(tokens, segment.value(), style); in print_path()
742 segment.punct().to_tokens(tokens); in print_path()
748 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
749 print_path_segment(tokens, self, PathStyle::AsWritten); in to_tokens()
753 fn print_path_segment(tokens: &mut TokenStream, segment: &PathSegment, style: PathStyle) { in print_path_segment()
754 segment.ident.to_tokens(tokens); in print_path_segment()
755 print_path_arguments(tokens, &segment.arguments, style); in print_path_segment()
760 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
761 print_path_arguments(tokens, self, PathStyle::AsWritten); in to_tokens()
765 fn print_path_arguments(tokens: &mut TokenStream, arguments: &PathArguments, style: PathStyle) { in print_path_arguments()
769 print_angle_bracketed_generic_arguments(tokens, arguments, style); in print_path_arguments()
772 print_parenthesized_generic_arguments(tokens, arguments, style); in print_path_arguments()
780 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
782 GenericArgument::Lifetime(lt) => lt.to_tokens(tokens), in to_tokens()
783 GenericArgument::Type(ty) => ty.to_tokens(tokens), in to_tokens()
785 generics::printing::print_const_argument(expr, tokens); in to_tokens()
787 GenericArgument::AssocType(assoc) => assoc.to_tokens(tokens), in to_tokens()
788 GenericArgument::AssocConst(assoc) => assoc.to_tokens(tokens), in to_tokens()
789 GenericArgument::Constraint(constraint) => constraint.to_tokens(tokens), in to_tokens()
796 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
797 print_angle_bracketed_generic_arguments(tokens, self, PathStyle::AsWritten); in to_tokens()
802 tokens: &mut TokenStream, in print_angle_bracketed_generic_arguments()
810 conditionally_print_turbofish(tokens, &arguments.colon2_token, style); in print_angle_bracketed_generic_arguments()
811 arguments.lt_token.to_tokens(tokens); in print_angle_bracketed_generic_arguments()
819 param.to_tokens(tokens); in print_angle_bracketed_generic_arguments()
837 <Token![,]>::default().to_tokens(tokens); in print_angle_bracketed_generic_arguments()
839 param.to_tokens(tokens); in print_angle_bracketed_generic_arguments()
846 arguments.gt_token.to_tokens(tokens); in print_angle_bracketed_generic_arguments()
851 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
852 self.ident.to_tokens(tokens); in to_tokens()
853 self.generics.to_tokens(tokens); in to_tokens()
854 self.eq_token.to_tokens(tokens); in to_tokens()
855 self.ty.to_tokens(tokens); in to_tokens()
861 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
862 self.ident.to_tokens(tokens); in to_tokens()
863 self.generics.to_tokens(tokens); in to_tokens()
864 self.eq_token.to_tokens(tokens); in to_tokens()
865 generics::printing::print_const_argument(&self.value, tokens); in to_tokens()
871 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
872 self.ident.to_tokens(tokens); in to_tokens()
873 self.generics.to_tokens(tokens); in to_tokens()
874 self.colon_token.to_tokens(tokens); in to_tokens()
875 self.bounds.to_tokens(tokens); in to_tokens()
881 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens()
882 print_parenthesized_generic_arguments(tokens, self, PathStyle::AsWritten); in to_tokens()
887 tokens: &mut TokenStream, in print_parenthesized_generic_arguments()
895 conditionally_print_turbofish(tokens, &None, style); in print_parenthesized_generic_arguments()
896 arguments.paren_token.surround(tokens, |tokens| { in print_parenthesized_generic_arguments()
897 arguments.inputs.to_tokens(tokens); in print_parenthesized_generic_arguments()
899 arguments.output.to_tokens(tokens); in print_parenthesized_generic_arguments()
903 tokens: &mut TokenStream, in print_qpath()
911 print_path(tokens, path, style); in print_qpath()
915 qself.lt_token.to_tokens(tokens); in print_qpath()
916 qself.ty.to_tokens(tokens); in print_qpath()
921 TokensOrDefault(&qself.as_token).to_tokens(tokens); in print_qpath()
922 path.leading_colon.to_tokens(tokens); in print_qpath()
924 print_path_segment(tokens, segment.value(), PathStyle::AsWritten); in print_qpath()
926 qself.gt_token.to_tokens(tokens); in print_qpath()
928 segment.punct().to_tokens(tokens); in print_qpath()
931 qself.gt_token.to_tokens(tokens); in print_qpath()
932 path.leading_colon.to_tokens(tokens); in print_qpath()
935 print_path_segment(tokens, segment.value(), style); in print_qpath()
936 segment.punct().to_tokens(tokens); in print_qpath()
941 tokens: &mut TokenStream, in conditionally_print_turbofish()
946 PathStyle::Expr => TokensOrDefault(colon2_token).to_tokens(tokens), in conditionally_print_turbofish()
948 PathStyle::AsWritten => colon2_token.to_tokens(tokens), in conditionally_print_turbofish()
959 fn to_tokens(&self, tokens: &mut TokenStream) { in span()
960 self.0.lt_token.to_tokens(tokens); in span()
961 self.0.gt_token.to_tokens(tokens); in span()