From 0626085cbe3b5973d0849ae76b8745fa70dfb75e Mon Sep 17 00:00:00 2001 From: nat Date: Thu, 5 Dec 2024 21:27:20 -0800 Subject: [PATCH] chore: delete op_utils --- src/main.rs | 1 - src/op_utils.rs | 24 ------------------------ 2 files changed, 25 deletions(-) delete mode 100644 src/op_utils.rs 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) - } - }; -}