Macro verilization_compiler::for_sep [−][src]
macro_rules! for_sep { ($var : pat, $iterator : expr, $sep : block, $body : block) => { ... }; }
Creates a loop with code executed in between each iteration.
use verilization_compiler::for_sep; let mut str = String::from(""); for_sep!(x, &["a", "b"], { str += ", "; }, { str += x; }); assert_eq!(str, "a, b");
Loops over the second parameter with the fourth parameter as the body. The third parameter block is executed in between each loop iteration. The first parameter is a pattern for each value.