Available on crate feature
lexer only.Expand description
Implementation of comment token lexing.
Comments are produced as tokens (rather than being discarded) so that the syntax tree produced by the parser is lossless. The parser skips over them.
Constants§
- MULTI_
LINE_ COMMENT_ END - The pattern that ends any multi-line comments (including doc comments).
- MULTI_
LINE_ COMMENT_ START - The pattern that starts any multi-line comments (including doc comments).
- SINGLE_
LINE_ COMMENT_ PREFIX - The pattern that begins any single line comments (including doc comments).
Functions§
- try_
match_ block_ comment - Attempt to match a block comment from the start of the Lexer::remaining fragment.
- try_
match_ single_ line_ comment - Attempt to match a single line comment from the start of the Lexer::remaining fragment.