Should greatly reduce the amount of syn::
qualifiers everywhere. Ambiguous names still use qualifier (eg syn::Path
)
YKL5NCLHVHFQMBIWC6HW4NFPPYK5DR6XTCKJ5VBHNLVP2RO3H24AC
QPZ6QNIEGMSQWN65HB7T44HUM42XSXZ6F5JOWEOTFPNDP2PQEKKQC
JCYJWUI32EEUQVQBLUNTSWZI6OXZJIRQMDU72DXWTJVU2LJJ6QWQC
BA5Y6VSEHJQBOYBS6R6FE6IZDRNAPNIN5ITJXWK7L46RJVHNI7JAC
GYTRFADRDO4SYXV6V3PEPGGFIRDHQH5YBTKEJCWFAIZ5CX4P46NAC
2N3KOCP74PCK2ETO5PCWBDR5PA57DDNT2KR4JLBPZPQPA56SAR4QC
4MMVEN5YUVUQ5RO3X2XKZVBMBMHOEJIYUCLKL63EPRUVQQRQXUAAC
FLIMM2YMIEXODPNP47RSACQEUN4CKRE2SA2RWKZN6FGKUU57DGJAC
RAWT2FQSTIP6EWFQXMAESASEM6AIFCV4PDO6TRUN6EAFVP3526YQC
use syn::{
token, AngleBracketedGenericArguments, Expr, ExprCall, ExprLit, ExprPath, ExprTuple,
GenericArgument, GenericParam, Generics, Ident, Item, ItemFn, ItemMod, ItemUse, Lit, LitStr,
PathArguments, PathSegment, ReturnType, Signature, Stmt, TraitBound, TraitBoundModifier,
TypeImplTrait, TypeParam, TypeParamBound, TypePath, UseGroup, UseName, UsePath, UseTree,
Visibility,
};
tree: syn::UseTree::Path(syn::UsePath {
ident: syn::Ident::new("xilem_html", proc_macro2::Span::call_site()),
colon2_token: syn::token::PathSep::default(),
tree: Box::new(syn::UseTree::Group(syn::UseGroup {
brace_token: syn::token::Brace::default(),
items: Punctuated::<syn::UseTree, syn::token::Comma>::from_iter(
tree: UseTree::Path(UsePath {
ident: Ident::new("xilem_html", proc_macro2::Span::call_site()),
colon2_token: token::PathSep::default(),
tree: Box::new(UseTree::Group(UseGroup {
brace_token: token::Brace::default(),
items: Punctuated::<UseTree, token::Comma>::from_iter(
fn_token: syn::token::Fn::default(),
ident: syn::Ident::new(name, proc_macro2::Span::call_site()),
generics: syn::Generics { lt_token: None, params: Punctuated::from_iter(vec![syn::GenericParam::Type(syn::TypeParam { attrs: Vec::new(), ident: syn::Ident::new("T", proc_macro2::Span::call_site()), colon_token: None, bounds: Punctuated::new(), eq_token: None, default: None })].into_iter()), gt_token: None, where_clause: None },
paren_token: syn::token::Paren::default(),
fn_token: token::Fn::default(),
ident: Ident::new(name, proc_macro2::Span::call_site()),
generics: Generics { lt_token: None, params: Punctuated::from_iter(vec![GenericParam::Type(TypeParam { attrs: Vec::new(), ident: Ident::new("T", proc_macro2::Span::call_site()), colon_token: None, bounds: Punctuated::new(), eq_token: None, default: None })].into_iter()), gt_token: None, where_clause: None },
paren_token: token::Paren::default(),
output: syn::ReturnType::Type(
syn::token::RArrow::default(),
Box::new(syn::Type::ImplTrait(syn::TypeImplTrait {
impl_token: syn::token::Impl::default(),
output: ReturnType::Type(
token::RArrow::default(),
Box::new(syn::Type::ImplTrait(TypeImplTrait {
impl_token: token::Impl::default(),
segments: Punctuated::from_iter(vec![syn::PathSegment { ident: syn::Ident::new("T", proc_macro2::Span::call_site()), arguments: syn::PathArguments::None }].into_iter()),
segments: Punctuated::from_iter(vec![PathSegment { ident: Ident::new("T", proc_macro2::Span::call_site()), arguments: PathArguments::None }].into_iter()),
fn path_segment(segment: &str) -> syn::PathSegment {
syn::PathSegment {
ident: syn::Ident::new(segment, proc_macro2::Span::call_site()),
arguments: syn::PathArguments::None,
fn path_segment(segment: &str) -> PathSegment {
PathSegment {
ident: Ident::new(segment, proc_macro2::Span::call_site()),
arguments: PathArguments::None,
pandoc_ast::Inline::Str(text) => syn::Expr::Lit(literal_string(text.as_str())),
pandoc_ast::Inline::Space | pandoc_ast::Inline::SoftBreak => {
syn::Expr::Lit(literal_string(" "))
}
pandoc_ast::Inline::Str(text) => Expr::Lit(literal_string(text.as_str())),
pandoc_ast::Inline::Space | pandoc_ast::Inline::SoftBreak => Expr::Lit(literal_string(" ")),