/* src/server/core/rust-macros/src/seam_command.rs */

use proc_macro2::TokenStream;
use quote::quote;
use syn::ItemFn;

use crate::seam_procedure::{ProcedureAttr, expand_with_type};

#[allow(clippy::needless_pass_by_value)]
pub fn expand(attr: TokenStream, item: ItemFn) -> syn::Result<TokenStream> {
  let parsed_attr: ProcedureAttr = syn::parse2(attr)?;
  expand_with_type(parsed_attr, &item, &quote! { seam_server::ProcedureType::Command })
}
