pub fn try_name<P: Parser>(p: &mut P) -> ReportedResult<Option<ast::CompoundName>> {
    // Parse a primary name.
    let primary = match try_primary_name(p) {
        Some(pn) => pn,
        None => return Ok(None),
    };

    // Wrap it up in a compound name, to be extended with suffices.
    let name = ast::CompoundName {
        id: Default::default(),
        span: primary.span,
        primary: primary,
        parts: Vec::new(),
    };

    // Parse a potential name suffix.
    parse_name_suffix(p, name).map(|x| Some(x))
}
/// Try to parse a name. IEEE 1076-2008 section 8.
Try to parse a name.
Try to parse a name .
pub fn try_name<P: Parser>(p: &mut P) -> ReportedResult<Option<ast::CompoundName>> {
    // Parse a primary name.
    let primary = match try_primary_name(p) {
        Some(pn) => pn,
        None => return Ok(None),
    };
    // Wrap it up in a compound name, to be extended with suffices.
    let name = ast::CompoundName {
        id: Default::default(),
        span: primary.span,
        primary: primary,
        parts: Vec::new(),
    };
    // Parse a potential name suffix.
    parse_name_suffix(p, name).map(|x| Some(x))
}
pub fn try_name < P : Parser > ( p : & mut P ) -> ReportedResult < Option < ast :: CompoundName > > { // Parse a primary name. let primary = match try_primary_name ( p ) { Some ( pn ) => pn , None => return Ok ( None ) , } ; // Wrap it up in a compound name, to be extended with suffices. let name = ast :: CompoundName { id : Default :: default ( ) , span : primary . span , primary : primary , parts : Vec :: new ( ) , } ; // Parse a potential name suffix. parse_name_suffix ( p , name ) . map ( | x | Some ( x ) ) }
Try to parse a name.
Try to parse a name .
p
&mut P
p
&mut P