chore: delete op_utils
This commit is contained in:
parent
b389e51f1e
commit
0626085cbe
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue