pub fn try_match_block_comment(lexer: &Lexer) -> Option<(usize, TokenTy)>Available on crate feature
lexer only.Expand description
Attempt to match a block comment from the start of the Lexer::remaining fragment.
Returns None if there is no block comment at the start of the remaining source. Otherwise returns the number of bytes in the comment and its kind:
/** ... */is a TokenTy::OuterBlockDocComment./*! ... */is a TokenTy::InnerBlockDocComment./**/,/***/,/*** ... */, and anything else are plain TokenTy::BlockComments.- A comment that is not closed before the end of the source is a TokenTy::UnterminatedBlockComment.
Block comments nest, so /* /* */ */ is a single comment.