macro_rules! command {
($commandName: ident {
$($arg: ident : $value: expr),* $(,)?
}) => { ... };
}
Expand description
A macro for quickly instantiating a float-valued command
For instance:
use g_code::command;
assert_eq!(command!(RapidPositioning { X: 0., Y: 1., }).iter().fold(String::default(), |s, f| s + &f.to_string()), "G0X0Y1");