#token #proc-macro #repeat

macro repeater

Proc-macro for repeating tokens

1 unstable release

0.1.0 Jun 18, 2024

#27 in #repeat

Zlib OR MIT OR Apache-2.0

14KB
243 lines

repeater

This crate provides the repeat! macro. See the macro for how to use.


repeater

This crate provides the repeat! macro, which lets you repeat tokens. In its simplest form, repeat! takes a repeat count and the tokens to repeat:

repeat!(5 => #(repeat this 5 times)*)

See the documentation for more advanced usage, including loop variables, interpolations and nesting.

Future plans

  • Non-integer loop variables, array syntax

No runtime deps