1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! Big Brain Derive
//! Procedural macros to simplify the implementation of Big Brain traits
mod action;
mod scorer;

use action::action_builder_impl;
use scorer::scorer_builder_impl;

/// Derives ActionBuilder for a struct that implements Component + Clone
#[proc_macro_derive(ActionBuilder, attributes(action_label))]
pub fn action_builder_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    action_builder_impl(input)
}

/// Derives ScorerBuilder for a struct that implements Component + Clone
#[proc_macro_derive(ScorerBuilder, attributes(scorer_label))]
pub fn scorer_builder_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    scorer_builder_impl(input)
}