whippyunits-proc-macros 0.1.0

Procedural macros for whippyunits unit definitions and declarators
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use proc_macro::TokenStream;
use quote::quote;

/// Define a local quantity trait and implementations for a given scale and set of units.
///
/// This is an internal macro used by define_unit_declarators! to generate the trait definitions.
/// Based on the original scoped_preferences.rs implementation.
pub fn define_local_quantity(_input: TokenStream) -> TokenStream {
    // This macro should be called from within the define_unit_declarators macro
    // It generates the trait and implementations based on the original pattern
    quote! {
        // This will be expanded by the define_unit_declarators macro
        // The actual implementation is in the define_unit_declarators_macro.rs file
    }
    .into()
}