pub fn try_match_single_line_comment(lexer: &Lexer) -> Option<(usize, TokenTy)>Available on crate feature
lexer only.Expand description
Attempt to match a single line comment from the start of the Lexer::remaining fragment.
Returns None if there is no single line comment at the start of the remaining source. Otherwise returns the number of bytes in the comment (not including the line ending) and the kind of comment:
/// ...is a TokenTy::OuterDocComment (documents the following item).//! ...is a TokenTy::InnerDocComment (documents the enclosing item).- Anything else (including
//// ...) is a plain TokenTy::LineComment.
Generally I’m trying to follow the rust comment spec here.