Rollup merge of #96682 - nnethercote:show-invisible-delims, r=petrochenkov
Show invisible delimeters (within comments) when pretty printing. Because invisible syntax is really hard to work with! r? `@petrochenkov`
This commit is contained in:
commit
7a915dd80d
17 changed files with 110 additions and 68 deletions
|
@ -50,11 +50,12 @@ pub enum Delimiter {
|
|||
Brace,
|
||||
/// `[ ... ]`
|
||||
Bracket,
|
||||
/// `Ø ... Ø`
|
||||
/// `/*«*/ ... /*»*/`
|
||||
/// An invisible delimiter, that may, for example, appear around tokens coming from a
|
||||
/// "macro variable" `$var`. It is important to preserve operator priorities in cases like
|
||||
/// `$var * 3` where `$var` is `1 + 2`.
|
||||
/// Invisible delimiters might not survive roundtrip of a token stream through a string.
|
||||
/// Invisible delimiters are not directly writable in normal Rust code except as comments.
|
||||
/// Therefore, they might not survive a roundtrip of a token stream through a string.
|
||||
Invisible,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue