pub fn lex_single_syntax_kind(text: &str) -> Option<(SyntaxKind, Option<SyntaxError>)> {
    lex_first_token(text)
        .filter(|(token, _)| token.len.to_usize() == text.len())
        .map(|(token, error)| (token.kind, error))
}
/// Returns `SyntaxKind` and `Option<SyntaxError>` of the first token
/// encountered at the beginning of the string.
///
/// Returns `None` if the string contains zero *or two or more* tokens.
/// The token is malformed if the returned error is not `None`.
///
/// Beware that unescape errors are not checked at tokenization time.
Returns `SyntaxKind` and `Option` of the first token
encountered at the beginning of the string.

Returns `None` if the string contains zero *or two or more* tokens.
The token is malformed if the returned error is not `None`.

Beware that unescape errors are not checked at tokenization time.
Returns ` SyntaxKind ` and ` Option ` of the first token encountered at the beginning of the string . Returns ` None ` if the string contains zero * or two or more * tokens . The token is malformed if the returned error is not ` None ` . Beware that unescape errors are not checked at tokenization time .
pub fn lex_single_syntax_kind(text: &str) -> Option<(SyntaxKind, Option<SyntaxError>)> {
    lex_first_token(text)
        .filter(|(token, _)| token.len.to_usize() == text.len())
        .map(|(token, error)| (token.kind, error))
}
pub fn lex_single_syntax_kind ( text : & str ) -> Option < ( SyntaxKind , Option < SyntaxError > ) > { lex_first_token ( text ) . filter ( | ( token , _ ) | token . len . to_usize ( ) == text . len ( ) ) . map ( | ( token , error ) | ( token . kind , error ) ) }
Returns `SyntaxKind` and `Option<SyntaxError>` of the first token
encountered at the beginning of the string.
Returns ` SyntaxKind ` and ` Option<SyntaxError > ` of the first token encountered at the beginning of the string .
text
&str