`TokenCursor` currently does doc comment desugaring on the fly, if the `desugar_doc_comment` field is set. This requires also modifying the token stream on the fly with `replace_prev_and_rewind`. This commit moves the doc comment desugaring out of `TokenCursor`, by introducing a new `TokenStream::desugar_doc_comment` method. This separation of desugaring and iterating makes the code nicer. |
||
|---|---|---|
| .. | ||
| lexer | ||
| parser | ||
| errors.rs | ||
| lib.rs | ||
| validate_attr.rs | ||