pub fn maybe_str(&self) -> Option<ast::Lit> {
        match *self {
            TokenTree::Token(sp, Token::Literal(Lit::Str_(s), _)) => {
                let l = LitKind::Str(Symbol::intern(&parse::str_lit(&s.as_str())),
                                     ast::StrStyle::Cooked);
                Some(Spanned {
                    node: l,
                    span: sp,
                })
            }
            TokenTree::Token(sp, Token::Literal(Lit::StrRaw(s, n), _)) => {
                let l = LitKind::Str(Symbol::intern(&parse::raw_str_lit(&s.as_str())),
                                     ast::StrStyle::Raw(n));
                Some(Spanned {
                    node: l,
                    span: sp,
                })
            }
            _ => None,
        }
    }
/// Returns an AST string literal.
Returns an AST string literal.
Returns an AST string literal .
pub fn maybe_str(&self) -> Option<ast::Lit> {
        match *self {
            TokenTree::Token(sp, Token::Literal(Lit::Str_(s), _)) => {
                let l = LitKind::Str(Symbol::intern(&parse::str_lit(&s.as_str())),
                                     ast::StrStyle::Cooked);
                Some(Spanned {
                    node: l,
                    span: sp,
                })
            }
            TokenTree::Token(sp, Token::Literal(Lit::StrRaw(s, n), _)) => {
                let l = LitKind::Str(Symbol::intern(&parse::raw_str_lit(&s.as_str())),
                                     ast::StrStyle::Raw(n));
                Some(Spanned {
                    node: l,
                    span: sp,
                })
            }
            _ => None,
        }
    }
pub fn maybe_str ( & self ) -> Option < ast :: Lit > { match * self { TokenTree :: Token ( sp , Token :: Literal ( Lit :: Str_ ( s ) , _ ) ) => { let l = LitKind :: Str ( Symbol :: intern ( & parse :: str_lit ( & s . as_str ( ) ) ) , ast :: StrStyle :: Cooked ) ; Some ( Spanned { node : l , span : sp , } ) } TokenTree :: Token ( sp , Token :: Literal ( Lit :: StrRaw ( s , n ) , _ ) ) => { let l = LitKind :: Str ( Symbol :: intern ( & parse :: raw_str_lit ( & s . as_str ( ) ) ) , ast :: StrStyle :: Raw ( n ) ) ; Some ( Spanned { node : l , span : sp , } ) } _ => None , } }
Returns an AST string literal.
Returns an AST string literal .
&self
&self