Skip to main content

try_match_block_comment

Function try_match_block_comment 

Source
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:

Block comments nest, so /* /* */ */ is a single comment.