Use a builder instead of a raw function

This pattern will, in the future, allow the registration of events
handlers and context objects.
This commit is contained in:
Rodolphe Breard 2019-01-03 20:16:23 +01:00
parent c25dfb253a
commit 98e4beadd3
3 changed files with 75 additions and 70 deletions

View file

@ -1,8 +1,6 @@
use crate::errors::Error;
use nom::{
alt, alt_complete, call, complete, cond, do_parse, error_position, map_res, named, tag,
take_until, take_while,
};
use nom::{alt, alt_complete, call, complete, cond, do_parse, error_position, map_res, named, tag,
take_until, take_while};
#[derive(Debug, PartialEq)]
pub enum Kind {