mirror of
https://github.com/kristoferssolo/des-rs.git
synced 2026-02-25 04:58:17 +00:00
feat(macros): add BitWrapper derive macro
This commit is contained in:
7
bit-wrap/src/bit_wrapper.rs
Normal file
7
bit-wrap/src/bit_wrapper.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
use crate::{codegen::generate_impl, grammar::StructDef};
|
||||
use unsynn::*;
|
||||
|
||||
pub fn impl_bit_wrapper(input: &TokenStream) -> TokenStream {
|
||||
let parsed = input.to_token_iter().parse::<StructDef>().unwrap();
|
||||
generate_impl(&parsed.into())
|
||||
}
|
||||
Reference in New Issue
Block a user