Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Dec 6, 2023
1 parent 78736a0 commit 19442e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions macro/src/dialect/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,18 +347,19 @@ impl<'a> Operation<'a> {
}

pub fn generate_operation(operation: &Operation) -> Result<TokenStream, Error> {
let summary = operation.summary()?;
let description = operation.description()?;
let class_name = format_ident!("{}", &operation.class_name()?);
let name = &operation.full_name()?;
let accessors = operation
.fields()
.map(|field| field.accessors())
.collect::<Result<Vec<_>, _>>()?;

let builder = OperationBuilder::new(operation)?;
let builder_tokens = builder.to_tokens()?;
let builder_fn = builder.create_op_builder_fn()?;
let default_constructor = builder.create_default_constructor()?;
let summary = operation.summary()?;
let description = operation.description()?;

Ok(quote! {
#[doc = #summary]
Expand Down

0 comments on commit 19442e3

Please sign in to comment.