diff options
Diffstat (limited to 'crates/ra_parser/src/grammar/patterns.rs')
-rw-r--r-- | crates/ra_parser/src/grammar/patterns.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_parser/src/grammar/patterns.rs b/crates/ra_parser/src/grammar/patterns.rs index 427c0eb49..716bdc978 100644 --- a/crates/ra_parser/src/grammar/patterns.rs +++ b/crates/ra_parser/src/grammar/patterns.rs | |||
@@ -192,7 +192,7 @@ fn record_field_pat_list(p: &mut Parser) { | |||
192 | p.bump(T!['{']); | 192 | p.bump(T!['{']); |
193 | while !p.at(EOF) && !p.at(T!['}']) { | 193 | while !p.at(EOF) && !p.at(T!['}']) { |
194 | match p.current() { | 194 | match p.current() { |
195 | // A trailing `..` is *not* treated as a DOT_DOT_PAT. | 195 | // A trailing `..` is *not* treated as a REST_PAT. |
196 | T![.] if p.at(T![..]) => p.bump(T![..]), | 196 | T![.] if p.at(T![..]) => p.bump(T![..]), |
197 | T!['{'] => error_block(p, "expected ident"), | 197 | T!['{'] => error_block(p, "expected ident"), |
198 | 198 | ||
@@ -217,7 +217,7 @@ fn record_field_pat_list(p: &mut Parser) { | |||
217 | bind_pat(p, false); | 217 | bind_pat(p, false); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | m.complete(p, RECORD_FIELD_PAT); | 220 | m.complete(p, RECORD_PAT_FIELD); |
221 | } | 221 | } |
222 | } | 222 | } |
223 | if !p.at(T!['}']) { | 223 | if !p.at(T!['}']) { |
@@ -225,7 +225,7 @@ fn record_field_pat_list(p: &mut Parser) { | |||
225 | } | 225 | } |
226 | } | 226 | } |
227 | p.expect(T!['}']); | 227 | p.expect(T!['}']); |
228 | m.complete(p, RECORD_FIELD_PAT_LIST); | 228 | m.complete(p, RECORD_PAT_FIELD_LIST); |
229 | } | 229 | } |
230 | 230 | ||
231 | // test placeholder_pat | 231 | // test placeholder_pat |
@@ -234,7 +234,7 @@ fn placeholder_pat(p: &mut Parser) -> CompletedMarker { | |||
234 | assert!(p.at(T![_])); | 234 | assert!(p.at(T![_])); |
235 | let m = p.start(); | 235 | let m = p.start(); |
236 | p.bump(T![_]); | 236 | p.bump(T![_]); |
237 | m.complete(p, PLACEHOLDER_PAT) | 237 | m.complete(p, WILDCARD_PAT) |
238 | } | 238 | } |
239 | 239 | ||
240 | // test dot_dot_pat | 240 | // test dot_dot_pat |
@@ -267,7 +267,7 @@ fn dot_dot_pat(p: &mut Parser) -> CompletedMarker { | |||
267 | assert!(p.at(T![..])); | 267 | assert!(p.at(T![..])); |
268 | let m = p.start(); | 268 | let m = p.start(); |
269 | p.bump(T![..]); | 269 | p.bump(T![..]); |
270 | m.complete(p, DOT_DOT_PAT) | 270 | m.complete(p, REST_PAT) |
271 | } | 271 | } |
272 | 272 | ||
273 | // test ref_pat | 273 | // test ref_pat |
@@ -361,7 +361,7 @@ fn bind_pat(p: &mut Parser, with_at: bool) -> CompletedMarker { | |||
361 | if with_at && p.eat(T![@]) { | 361 | if with_at && p.eat(T![@]) { |
362 | pattern_single(p); | 362 | pattern_single(p); |
363 | } | 363 | } |
364 | m.complete(p, BIND_PAT) | 364 | m.complete(p, IDENT_PAT) |
365 | } | 365 | } |
366 | 366 | ||
367 | // test box_pat | 367 | // test box_pat |