SynParsing(Error("unrecognized fragment specifier"))
Hi! Thanks, but does not work on my Firefox.

The error seems to come from https://github.com/lukaslueg/macro_railroad/blob/9941de799eb0c2cc067351551ee67cce6b65a2fd/src/parser.rs#L252 The problem is probably that the pat_param fragment specifier of $pattern:pat_param isn't supported yet by macro_railroad. The fix would be to add a PatParam variant to the Fragment enum and then parse pat_param to this variant I think. pat_param was introduced in the rust 2021 edition. The latest commit to macro_railroad was from 2020.
Yes, this is because the parser does not recognize or-patterns as defined in the 2021 editions. We need two things, at least:
- Expand the parser to recognize
or_patterns/$pat_param. - Add a knob to the parser that controls the edition the input is parsed for, as in
2018we do not parsepat_param.
The parser needs to be expanded here to add the PatParam, an appropriate lowering here (if needed), and - if a new lowering-pattern was added - a rule how to draw the pattern based on railroad here. We need test cases for the parser's behavior in all cases four cases (2018, 2021, pat_param, pat).