1
Fork 0
rust/compiler/rustc_parse/src/parser
Dylan DPC 80045d65e1
Rollup merge of #96421 - nnethercote:less-NoDelim, r=petrochenkov
Less `NoDelim`

Currently there are several places where `NoDelim` (which really means "implicit delimiter" or "invisible delimiter") is used to mean "no delimiter". The name `NoDelim` is a bit misleading, and may be a cause.

This PR changes these places, e.g. by changing a `DelimToken` to `Option<DelimToken>` and then using `None` to mean "no delimiter". As a result, the *only* place where `NoDelim` values are now produced is within:
- `Delimiter::to_internal()`, when converting from `Delimiter::None`.
- `FlattenNonterminals::process_token()`, when converting `TokenKind::Interpolated`.

r? ````@petrochenkov````
2022-04-28 02:40:34 +02:00
..
attr.rs Stop flagging certain inner attrs as outer ones 2022-04-06 19:54:05 +02:00
attr_wrapper.rs Avoid producing NoDelim values in FrameData. 2022-04-27 10:35:29 +10:00
diagnostics.rs Better handle too many # recovery in raw str 2022-04-23 19:51:11 -07:00
expr.rs Avoid producing NoDelim values in TokenCursorFrame. 2022-04-27 08:15:05 +10:00
generics.rs diagnostics: correct generic bounds with doubled colon 2022-03-25 13:57:05 -07:00
item.rs use to_string instead of format! 2022-04-12 07:51:23 +09:00
mod.rs Avoid producing NoDelim values in TokenCursorFrame. 2022-04-27 08:15:05 +10:00
nonterminal.rs Inline Parser::nonterminal_may_begin_with. 2022-04-20 14:13:49 +10:00
pat.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
path.rs better error for binder on associated type bound 2022-04-10 16:41:15 -07:00
stmt.rs Avoid producing NoDelim values in MacArgs::delim(). 2022-04-27 08:15:12 +10:00
ty.rs Stablize const_extern_fn for "Rust" and "C" 2022-03-26 18:23:54 -04:00