Reduce if statements for always-succeed cases
If a rule always succeeds, the code that calls that rule does not need to check the result of its parse function. The else from that check is difficult to test without resorting to tricks.
This is separate, but potentially related to #576.
This is already should be implemented, inference-match-result pass does the job. You found an example where something else can be removed?
Here is a cut-down example:
Foo
= either " "
either
= "."
/ [a-z]*
which has this in the output js:
function peg$parseFoo() {
var s0, s1, s2;
s0 = peg$currPos;
s1 = peg$parseeither();
if (s1 !== peg$FAILED) {
...
Just came to look at this again, and it took me a few seconds to realize that either always matches because the last choice matches the empty string.