A parser that delegates to an inner parser chosen by the mux
function.
Shortcut for creating a MultiplexedParser
.
Shortcut for creating a MultiplexedParser
. Example usage:
// the resulting parser will use the `fooParser` when used // in the "foo" context, and `barParser` in the "bar" context Parser.multiplex[String] { case "foo" => fooParser case "bar" => barParser }
The context type being matched
An object whose apply
method takes the actual mux
function.
The two are separated since the In
type cannot be inferred by
the compiler but the Out
type can. This way you can avoid
having to specify both.