Available on crate feature
lexer
only.Expand description
Implementation of comment token lexing.
Constants§
- The pattern that ends any multi-line comments (including doc comments).
- The pattern that starts any multi-line comments (including doc comments).
- The pattern that begins any single line comments (including doc comments).
Functions§
- Attempt to match a block comment from the start of the Lexer::remaining fragment. Return a usize and optionally a TokenTy. The usize indicates how many bytes were in the comment. The TokenTy (if it’s not None) should be TokenTy::InnerBlockDocComment, TokenTy::OuterBlockDocComment, or TokenTy::UnterminatedBlockComment.
- Attempt to match a sinlgle line comment from the start of the Lexer::remaining fragment. Return a usize and optionally a TokenTy. The usize indicates how many bytes were in the comment. The TokenTy (if it’s not None) should be either TokenTy::InnerDocComment or TokenTy::OuterDocComment.