mirror of
https://github.com/fluencelabs/interface-types
synced 2025-04-25 07:42:14 +00:00
26 lines
579 B
Rust
26 lines
579 B
Rust
|
#[allow(unused)]
|
||
|
macro_rules! d {
|
||
|
($expression:expr) => {
|
||
|
match $expression {
|
||
|
tmp => {
|
||
|
eprintln!(
|
||
|
"[{}:{}] {} = {:?}",
|
||
|
file!(),
|
||
|
line!(),
|
||
|
stringify!($expression),
|
||
|
&tmp
|
||
|
);
|
||
|
|
||
|
tmp
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
macro_rules! consume {
|
||
|
(($input:ident, $parser_output:ident) = $parser_expression:expr) => {
|
||
|
let (next_input, $parser_output) = $parser_expression;
|
||
|
$input = next_input;
|
||
|
};
|
||
|
}
|