diff options
| author | HampusM <hampus@hampusmat.com> | 2026-06-09 00:13:13 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-06-09 00:13:13 +0200 |
| commit | 62fe748a90efc35e9a5839b55b75a3db043102f1 (patch) | |
| tree | 21b96060910e357f1730b44765ed3302d3a25566 /engine-macros/src/reflection.rs | |
| parent | eaff58026be19c068005d6e90bd9e8cbe985b093 (diff) | |
refactor(engine-macros): split up into multiple modules
Diffstat (limited to 'engine-macros/src/reflection.rs')
| -rw-r--r-- | engine-macros/src/reflection.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engine-macros/src/reflection.rs b/engine-macros/src/reflection.rs new file mode 100644 index 0000000..825094b --- /dev/null +++ b/engine-macros/src/reflection.rs @@ -0,0 +1,15 @@ +mod enum_impl; +mod field; +mod struct_impl; +mod visibility; + +pub fn derive(input: proc_macro2::TokenStream) -> proc_macro2::TokenStream +{ + let input = syn::parse2::<syn::Item>(input).unwrap(); + + match input { + syn::Item::Struct(input) => struct_impl::generate(input), + syn::Item::Enum(input) => enum_impl::generate(input), + _ => panic!("Invalid input"), + } +} |
