use quote::quote;
mod derive_behavior;
use derive_behavior::derive_behavior_impl;
use proc_macro::TokenStream;
#[proc_macro_derive(Action, attributes(behavior))]
pub fn derive_action(input: TokenStream) -> TokenStream {
derive_behavior_impl(
input.into(),
quote! { behaviortree_core::behavior_kind::BehaviorKind::Action },
)
.into()
}
#[proc_macro_derive(Condition, attributes(behavior))]
pub fn derive_condition(input: TokenStream) -> TokenStream {
derive_behavior_impl(
input.into(),
quote! { behaviortree_core::behavior_kind::BehaviorKind::Condition },
)
.into()
}
#[proc_macro_derive(Control, attributes(behavior))]
pub fn derive_control(input: TokenStream) -> TokenStream {
derive_behavior_impl(
input.into(),
quote! { behaviortree_core::behavior_kind::BehaviorKind::Control },
)
.into()
}
#[proc_macro_derive(Decorator, attributes(behavior))]
pub fn derive_decorator(input: TokenStream) -> TokenStream {
derive_behavior_impl(
input.into(),
quote! { behaviortree_core::behavior_kind::BehaviorKind::Decorator },
)
.into()
}