macro_loop
The macro_loop Rust crate provides structured macro logic, with loops, conditionals and variables over fragments,
to make complex code generation readable and composable.
For-loops emit their body per value:
use macro_loop;
macro_loop!
// outputs:
// struct Vec2;
// struct Vec3;
// struct Vec4;
If-statements emit their body only if their condition is met:
use macro_loop;
Multiple parameters in for-loops emit their body per combination of values:
use macro_loop;
macro_loop!
// outputs:
// struct BoolToInt;
// struct BoolToFloat;
// struct IntToBool;
// struct IntToFloat;
// struct FloatToBool;
// struct FloatToInt;
Let-statements give names to fragments:
use macro_loop;
List fragments can be seperated:
use macro_loop;