Macro nom::delimited [−][src]
macro_rules! delimited { ($i:expr, $submac:ident!( $($args:tt)* ), $($rest:tt)*) => { ... }; ($i:expr, $f:expr, $submac:ident!( $($args:tt)* ), $($rest:tt)*) => { ... }; ($i:expr, $f:expr, $g:expr, $submac:ident!( $($args:tt)* )) => { ... }; ($i:expr, $f:expr, $g:expr, $h:expr) => { ... }; }
delimited!(I -> IResult<I,T>, I -> IResult<I,O>, I -> IResult<I,U>) => I -> IResult<I, O>
delimited(opening, X, closing) returns X
named!(parens, delimited!( tag!("("), alpha1, tag!(")") ) ); let input = &b"(test)"[..]; assert_eq!(parens(input), Ok((&b""[..], &b"test"[..])));