// let mut output = vec![];
for field in &fields.named {
-// dbg!(field);
+ dbg!(field);
let mut skl = quote!{ SKL::Ordinary };
let mut method = quote!{ ordinary };
for attr in &field.attrs {
if attr.tokens.is_empty() {
+ let atspan = attr.path.segments.last().unwrap().ident.span();
if &attr.path == &parse_quote!{ limited } {
- skl = quote!{ SKL::Limited };
- method = quote!{ limited };
+ skl = quote_spanned!{atspan=> SKL::Limited };
+ method = quote_spanned!{atspan=> limited };
} else if &attr.path == &parse_quote!{ server } {
- method = quote!{ server };
+ method = quote_spanned!{atspan=> server };
} else if &attr.path == &parse_quote!{ client } {
- method = quote!{ client };
+ method = quote_spanned!{atspan=> client };
}
} else if &attr.path == &parse_quote!{ special } {
let meta = match attr.parse_meta().unwrap() {