binator_base/parse.rs
1use core::fmt::Debug;
2
3use binator_core::Parse;
4
5/// Take a parser and return a Parser that will call parse on it.
6pub fn parse<Stream, Context, Parser>(
7 mut parser: Parser,
8) -> impl Parse<Stream, Context, Token = Parser::Token>
9where
10 Parser: Parse<Stream, Context>,
11 Parser::Token: Debug,
12{
13 move |stream: Stream| parser.parse(stream)
14}