Define Parser as an enum parameterized by a type to recur through.
Hopefully faster type inference.
Hopefully better errors.
Can vary Recur in Parser<Collection, Tree, Recur> to represent other interesting data (e.g. Parser<Collection, Tree, (Collection.Index, String)> for errors).
Define
Parser
as anenum
parameterized by a type to recur through.Recur
inParser<Collection, Tree, Recur>
to represent other interesting data (e.g.Parser<Collection, Tree, (Collection.Index, String)>
for errors).