diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-01 10:53:00 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-03 10:06:52 +1100 |
| commit | af1d16e82ddc27166438e8bc2a520087862f12af (patch) | |
| tree | 09ecefef955ad55a2b81a0dc604d0e79a0c0968e /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 97872b792c9dd6a9bc5c3f4e62a0bd5958b09cdc (diff) | |
| download | rust-af1d16e82ddc27166438e8bc2a520087862f12af.tar.gz rust-af1d16e82ddc27166438e8bc2a520087862f12af.zip | |
Improve doc comment desugaring.
Sometimes the parser needs to desugar a doc comment into `#[doc = r"foo"]`. Currently it does this in a hacky way: by pushing a "fake" new frame (one without a delimiter) onto the `TokenCursor` stack. This commit changes things so that the token stream itself is modified in place. The nice thing about this is that it means `TokenCursorFrame::delim_sp` is now only `None` for the outermost frame.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
0 files changed, 0 insertions, 0 deletions
