pub fn lex_single_valid_syntax_kind(text: &str) -> Option<SyntaxKind> {
    lex_first_token(text)
        .filter(|(token, error)| !error.is_some() && token.len.to_usize() == text.len())
        .map(|(token, _error)| token.kind)
}
/// The same as `lex_single_syntax_kind()` but returns only `SyntaxKind` and
/// returns `None` if any tokenization error occured.
///
/// Beware that unescape errors are not checked at tokenization time.


Beware that unescape errors are not checked at tokenization time.
Beware that unescape errors are not checked at tokenization time .
pub fn lex_single_valid_syntax_kind(text: &str) -> Option<SyntaxKind> {
    lex_first_token(text)
        .filter(|(token, error)| !error.is_some() && token.len.to_usize() == text.len())
        .map(|(token, _error)| token.kind)
}
pub fn lex_single_valid_syntax_kind ( text : & str ) -> Option < SyntaxKind > { lex_first_token ( text ) . filter ( | ( token , error ) | ! error . is_some ( ) && token . len . to_usize ( ) == text . len ( ) ) . map ( | ( token , _error ) | token . kind ) }
The same as `lex_single_syntax_kind()` but returns only `SyntaxKind` and
returns `None` if any tokenization error occured.
The same as ` lex_single_syntax_kind () ` but returns only ` SyntaxKind ` and returns ` None ` if any tokenization error occured .
text
&str