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
We simplify construction a bit to prepare for bigger simplifications.
We also fix a bug in 'Hir::alternation' where it would incorrectly
return 'Hir::empty()' when given an empty alternation. That's correct
for an empty concatenation, but an alternation with no branches is
equivalent to an expression that never matches anything.
To fix that, we create a new 'Hir::fail' that canonicalizes the HIR
value used to indicate "impossible to match."
Thankfully this bug was unlikely to be observed unless one was
constructing HIR values manually. Namely, it is impossible to spell
"empty alternation" in the concrete syntax of a regex.
0 commit comments