// Return the name for a macro definition (identifier after first `!`)
Return the name for a macro definition (identifier after first `!`)
Return the name for a macro definition ( identifier after first ` ! ` )
pub fn span_for_macro_def_name(&self, span: Span) -> Option<Span> {
        let mut toks = self.retokenise_span(span);
        loop {
            let ts = toks.real_token();
            if ts.tok == token::Eof {
                return None;
            }
            if ts.tok == token::Not {
                let ts = toks.real_token();
                if ts.tok.is_ident() {
                    return self.make_sub_span(span, Some(ts.sp));
                } else {
                    return None;
                }
            }
        }
    }
pub fn span_for_macro_def_name ( & self , span : Span ) -> Option < Span > { let mut toks = self . retokenise_span ( span ) ; loop { let ts = toks . real_token ( ) ; if ts . tok == token :: Eof { return None ; } if ts . tok == token :: Not { let ts = toks . real_token ( ) ; if ts . tok . is_ident ( ) { return self . make_sub_span ( span , Some ( ts . sp ) ) ; } else { return None ; } } } }
Return the name for a macro definition (identifier after first `!`)
Return the name for a macro definition ( identifier after first ` ! ` )
&self
span
Span