Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow missing sections #17
Unfortunately, I wasn't able to come up with a simple way to match zero or one instances of a pattern. Because of this, it's possible to write a few pathological errors that will cause infinite recursion rather than a more helpful description.
Because there are multiple
It is necessary for there to be a rule like this that matches zero or one type blocks with zero or one entry sections, so I don't see how to avoid matching on more than one type block or more than one entry section.
Perhaps an RFC for a macro_rules