diff --git a/src/transform/add.rs b/src/transform/add.rs new file mode 100644 index 0000000..e43ffce --- /dev/null +++ b/src/transform/add.rs @@ -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(()) + } +} diff --git a/src/transform/mod.rs b/src/transform/mod.rs index a0e810d..b4d2a75 100644 --- a/src/transform/mod.rs +++ b/src/transform/mod.rs @@ -236,6 +236,7 @@ macro_rules! transforms { transforms!( sanitize::Sanitize, sort::Sort, + add::Add, delete::Delete, delete_enums::DeleteEnums, delete_enums_with_variants::DeleteEnumsWithVariants,