Skip to content

Commit

Permalink
Merge pull request #42 from mcx-rs/transform-Add
Browse files Browse the repository at this point in the history
Add Add.
  • Loading branch information
Dirbaio authored Dec 15, 2024
2 parents 8a763c6 + 123dc37 commit 29e7788
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/transform/add.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use serde::{Deserialize, Serialize};

use crate::ir::*;

#[derive(Debug, Serialize, Deserialize)]
pub struct Add {
ir: IR,
}

impl Add {
pub fn run(&self, ir: &mut IR) -> anyhow::Result<()> {
ir.merge(self.ir.clone());
Ok(())
}
}
1 change: 1 addition & 0 deletions src/transform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ macro_rules! transforms {
transforms!(
sanitize::Sanitize,
sort::Sort,
add::Add,
delete::Delete,
delete_enums::DeleteEnums,
delete_enums_with_variants::DeleteEnumsWithVariants,
Expand Down

0 comments on commit 29e7788

Please sign in to comment.