You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some were rejected explicitly with this "alternations cannot currently
contain empty sub-expressions" error. Some were causing alternations to
be compiled into automaton matching a different regex.
The root of the issue is that the compilation of the Empty pattern
returns Patch { entry: self.insts.len(), .. }, that is it claims
its entry point is the next instruction. This only works if the
next instruction is unconditionally executed, which is not true for
alternations.
So we return None instead, and let the callers decide how to handle an
empty regex.
Fixes#524, Fixes#659, Closes#677
0 commit comments