diff options
author | JSDurand <mmemmew@gmail.com> | 2023-01-13 14:25:40 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-01-13 14:25:40 +0800 |
commit | 3c6511f69c7639abff60ac9999a08ce2daa24a7d (patch) | |
tree | b39aa27a4c5454a4b0203faccd57e4136dbbe663 /graph_macro/src/lib.rs | |
parent | 1a3d346f413325ed37848a6b2526e8e729269833 (diff) |
macro: try to write a macro for inhereting graphs
An attempt to write a derive macro to automatically derive the various
graph traits.
Diffstat (limited to 'graph_macro/src/lib.rs')
-rw-r--r-- | graph_macro/src/lib.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/graph_macro/src/lib.rs b/graph_macro/src/lib.rs new file mode 100644 index 0000000..5a0672b --- /dev/null +++ b/graph_macro/src/lib.rs @@ -0,0 +1,12 @@ +//! This file provides a macro to delegate the implementation of a +//! type that wraps a graph. More precisely, the macro helps the +//! wrapper type implement the various Graph-related traits. + +use proc_macro::TokenStream; + +#[proc_macro_derive(Testing)] +pub fn test_derive(input: TokenStream) -> TokenStream { + println!("input: {input:?}"); + + TokenStream::new() +} |