diff --git a/src/main.rs b/src/main.rs index 5beb5b8..745fa05 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,6 @@ use std::fs::File; use std::io::Read; use std::collections::{VecDeque, HashMap, BTreeSet}; -mod op_utils; mod math; mod stack; mod state; diff --git a/src/op_utils.rs b/src/op_utils.rs deleted file mode 100644 index 2fee367..0000000 --- a/src/op_utils.rs +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Runs the given macro on a combination of two stacks depending on the value - * of the stack code. The highest-order bit represents the source stack and the - * lowest represents the destination. - * - * Unlike `match_ternary_stack_code`, `match_binary_stack_code` takes a third, - * immediate argument, for a literal number that may be used in the operation - */ -#[macro_export] -macro_rules! match_binary_stack_code { - ($macro: ident, $stack_code:expr, $root:expr, $trunk:expr) => { - match_binary_stack_code!($macro, $stack_code, $root, $trunk, 0); - }; - - ($macro: ident, $stack_code:expr, $root:expr, $trunk:expr, $immediate:expr) => { - match $stack_code { - 0b00 => $macro!($root, $root, $immediate), - 0b01 => $macro!($root, $trunk, $immediate), - 0b10 => $macro!($trunk, $root, $immediate), - 0b11 => $macro!($trunk, $trunk, $immediate), - _ => panic!("Invalid stack code: {}", $stack_code) - } - }; -}