diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-15 08:10:16 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-15 08:10:16 +0100 |
commit | 2d79a1ad83cc39075c7c9e3230973013c8c58b17 (patch) | |
tree | e394007f715f8586c737db8f20f2d8f16f8913af /crates/ra_parser/src/syntax_kind | |
parent | bcdba777bdc43762cff73ac3ded4ae737a503692 (diff) | |
parent | 0956323bb7b728da6bff4ad7241a542f4bb4e8e6 (diff) |
Merge #1848
1848: Parse `..` as a full pattern r=matklad a=ecstatic-morse
Resolves #1479.
This PR implements [RFC 2707](https://github.com/rust-lang/rfcs/pull/2707) in the parser. It introduces a new `DotDotPat` AST node modeled on `PlaceholderPat` and changes the parsing of tuple and slice patterns to conform to the RFC.
Notably, this PR does *not* change the resulting AST when `..` appears in a struct pattern (e.g. `Struct { a, b: c, .. }`). I *think* this is the behavior mandated by RFC 2707, but someone should confirm this.
Co-authored-by: Dylan MacKenzie <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/syntax_kind')
-rw-r--r-- | crates/ra_parser/src/syntax_kind/generated.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 8ba29ebf8..23eb3c9cb 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs | |||
@@ -152,6 +152,7 @@ pub enum SyntaxKind { | |||
152 | BOX_PAT, | 152 | BOX_PAT, |
153 | BIND_PAT, | 153 | BIND_PAT, |
154 | PLACEHOLDER_PAT, | 154 | PLACEHOLDER_PAT, |
155 | DOT_DOT_PAT, | ||
155 | PATH_PAT, | 156 | PATH_PAT, |
156 | RECORD_PAT, | 157 | RECORD_PAT, |
157 | RECORD_FIELD_PAT_LIST, | 158 | RECORD_FIELD_PAT_LIST, |