lukaslueg / macro_railroad

A library to generate syntax diagrams for Rust macros.
MIT License
529 stars 11 forks source link

Disallow separator on `?` repetition #21

Closed dtolnay closed 5 years ago

dtolnay commented 5 years ago

This is not accepted by rustc.

macro_rules! m { ($($tt:tt)-?) => {} }
error: the `?` macro repetition operator does not take a separator
 --> src/lib.rs
  |
  | macro_rules! m { ($($tt:tt)-?) => {} }
  |                            ^
lukaslueg commented 5 years ago

Thanks for the heads-up, this is now a parser-error.