derive_less
A library for generating #[...] and pub code in item declarations.
Example
Suppose you needed the following code:
;
;
Instead of typing out #[orange], #[apple], and pub, repeatedly for each item declaration, you could simply write:
use derive_less;
derive_less!
Caveats
Currently only supports and tuple structs and enums with unnamed fields.
Fields and variants only accept one #[...] due to current limitations in macro_rules!.
Future work
Handle more cases by either rewriting the derive_less! macro using Rust's procedural macro interface or through a build-script that generates declarative macro code.