Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- macro_rules! bigprint {
- ( __end $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- compile_error!(concat!("\n", $line1, "\n", $line2, "\n", $line3, "\n", $line4, "\n", $line5));
- };
- ( __cont (d $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __cont ($($letters)*) | concat!($line1, " OOOO "), concat!($line2, " O O "), concat!($line3, " O O "), concat!($line4, " O O "), concat!($line5, " OOOO "));
- };
- ( __cont (e $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __cont ($($letters)*) | concat!($line1, " OOOOO "), concat!($line2, " O "), concat!($line3, " OOO "), concat!($line4, " O "), concat!($line5, " OOOOO "));
- };
- ( __cont (h $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __cont ($($letters)*) | concat!($line1, " O O "), concat!($line2, " O O "), concat!($line3, " OOOOO "), concat!($line4, " O O "), concat!($line5, " O O "));
- };
- ( __cont (l $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __cont ($($letters)*) | concat!($line1, " O "), concat!($line2, " O "), concat!($line3, " O "), concat!($line4, " O "), concat!($line5, " OOOOO "));
- };
- ( __cont (o $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __cont ($($letters)*) | concat!($line1, " OOO "), concat!($line2, " O O "), concat!($line3, " O O "), concat!($line4, " O O "), concat!($line5, " OOO "));
- };
- ( __cont (r $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __cont ($($letters)*) | concat!($line1, " OOOO "), concat!($line2, " O O "), concat!($line3, " OOOO "), concat!($line4, " O O "), concat!($line5, " O O "));
- };
- ( __cont (w $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __cont ($($letters)*) | concat!($line1, " O O "), concat!($line2, " O O O "), concat!($line3, " O O O "), concat!($line4, " O O O "), concat!($line5, " O O "));
- };
- ( __cont (_ $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __cont ($($letters)*) | concat!($line1, " "), concat!($line2, " "), concat!($line3, " "), concat!($line4, " "), concat!($line5, " "));
- };
- ( __cont ($foo:tt $( $letters:tt )*) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- compile_error!(concat!("unmatched: ", stringify!($foo)));
- };
- ( __cont ( ) | $line1:expr, $line2:expr, $line3:expr, $line4:expr, $line5:expr ) => {
- bigprint!( __end $line1, $line2, $line3, $line4, $line5);
- };
- ( $( $letters:tt )* ) => {
- bigprint!( __cont ($($letters)*) | "", "", "", "", "");
- };
- }
- bigprint!(h e l l o _ w o r l d);
Add Comment
Please, Sign In to add comment