Skip to content

Commit 6943430

Browse files
committed
Add ? to unstable book
1 parent bd98a93 commit 6943430

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# `macro_at_most_once_rep`
2+
3+
The tracking issue for this feature is: TODO(mark-i-m)
4+
5+
With this feature gate enabled, one can use `?` as a Kleene operator meaning "0
6+
or 1 repetitions" in a macro definition. Previously only `+` and `*` were allowed.
7+
8+
For example:
9+
```rust
10+
macro_rules! foo {
11+
(something $(,)?) // `?` indicates `,` is "optional"...
12+
=> {}
13+
}
14+
```
15+
16+
------------------------
17+

0 commit comments

Comments
 (0)