fuels_rs/code_gen/docs_gen.rs
1use proc_macro2::{Literal, TokenStream};
2use quote::quote;
3
4/// Functions used by the Abigen to expand functions defined in an ABI spec.
5
6/// Expands a doc string into an attribute token stream.
7pub fn expand_doc(s: &str) -> TokenStream {
8 let doc = Literal::string(s);
9 quote! {
10 #[doc = #doc]
11 }
12}