🎨 Nueov enfoque para las funciones de traducción
This commit is contained in:
parent
7691bf4b2f
commit
71b0b0889d
11 changed files with 110 additions and 93 deletions
|
|
@ -8,8 +8,8 @@ mod escape;
|
|||
mod generate;
|
||||
mod parse;
|
||||
|
||||
use proc_macro_crate::{crate_name, FoundCrate};
|
||||
use proc_macro2::{Ident, Span, TokenStream, TokenTree};
|
||||
use proc_macro_crate::{crate_name, FoundCrate};
|
||||
use quote::quote;
|
||||
|
||||
pub fn expand(input: TokenStream) -> TokenStream {
|
||||
|
|
@ -27,7 +27,7 @@ pub fn expand(input: TokenStream) -> TokenStream {
|
|||
),
|
||||
_ => quote!(
|
||||
pagetop::html::PreEscaped(#output_ident)
|
||||
)
|
||||
),
|
||||
};
|
||||
|
||||
quote!({
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ impl Generator {
|
|||
),
|
||||
_ => quote!(
|
||||
pagetop::html::html_private::render_to!(&#expr, &mut #output_ident);
|
||||
)
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue