pub(super) fn match_(pattern: &tt::Subtree, src: &tt::Subtree) -> Result<Match, ExpandError> {
    assert!(pattern.delimiter == None);

    let mut res = Match::default();
    let mut src = TtIter::new(src);

    match_subtree(&mut res, pattern, &mut src)?;

    if src.len() > 0 {
        res.unmatched_tts += src.len();
        res.add_err(err!("leftover tokens"));
    }

    Ok(res)
}
// General note: These functions have two channels to return errors, a `Result`
// return value and the `&mut Match`. The returned Result is for pattern parsing
// errors; if a branch of the macro definition doesn't parse, it doesn't make
// sense to try using it. Matching errors are added to the `Match`. It might
// make sense to make pattern parsing a separate step?
General note: These functions have two channels to return errors, a `Result`
return value and the `&mut Match`. The returned Result is for pattern parsing
errors; if a branch of the macro definition doesn't parse, it doesn't make
sense to try using it. Matching errors are added to the `Match`.
General note : These functions have two channels to return errors a ` Result ` return value and the ` &mut Match ` . The returned Result is for pattern parsing errors ; if a branch of the macro definition doesn ' t parse it doesn ' t make sense to try using it . Matching errors are added to the ` Match ` .
pub(super) fn match_(pattern: &tt::Subtree, src: &tt::Subtree) -> Result<Match, ExpandError> {
    assert!(pattern.delimiter == None);
    let mut res = Match::default();
    let mut src = TtIter::new(src);
    match_subtree(&mut res, pattern, &mut src)?;
    if src.len() > 0 {
        res.unmatched_tts += src.len();
        res.add_err(err!("leftover tokens"));
    }
    Ok(res)
}
pub ( super ) fn match_ ( pattern : & tt :: Subtree , src : & tt :: Subtree ) -> Result < Match , ExpandError > { assert ! ( pattern delimiter None ) ; let mut res = Match :: default ( ) ; let mut src = TtIter :: new ( src ) ; match_subtree ( & mut res , pattern , & mut src ) ? ; if src . len ( ) > 0 { res . unmatched_tts += src . len ( ) ; res . add_err ( err ! ( " " ) ) ; } Ok ( res ) }
General note: These functions have two channels to return errors, a `Result`
return value and the `&mut Match`.
General note : These functions have two channels to return errors a ` Result ` return value and the ` &mut Match ` .
pattern
&tt::Subtree
src
&tt::Subtree
pattern
&tt::Subtree
src
&tt::Subtree