diff options
author | pcpthm <[email protected]> | 2019-03-17 11:57:27 +0000 |
---|---|---|
committer | pcpthm <[email protected]> | 2019-03-17 11:57:27 +0000 |
commit | a67fe4ea7e623ef31228295aedafb3bd18f4a23d (patch) | |
tree | 76a3434979cc4895dd4f6ca377e59ce031834a9e /crates/ra_parser/src/grammar/expressions | |
parent | aea9c98f53c66cac350781c3c531ef11cef861b6 (diff) |
Fix parse tree of attribute on match arm
Diffstat (limited to 'crates/ra_parser/src/grammar/expressions')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 53bb26c5f..d933288cd 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -342,21 +342,6 @@ pub(crate) fn match_arm_list(p: &mut Parser) { | |||
342 | continue; | 342 | continue; |
343 | } | 343 | } |
344 | 344 | ||
345 | // test match_arms_outer_attributes | ||
346 | // fn foo() { | ||
347 | // match () { | ||
348 | // #[cfg(feature = "some")] | ||
349 | // _ => (), | ||
350 | // #[cfg(feature = "other")] | ||
351 | // _ => (), | ||
352 | // #[cfg(feature = "many")] | ||
353 | // #[cfg(feature = "attributes")] | ||
354 | // #[cfg(feature = "before")] | ||
355 | // _ => (), | ||
356 | // } | ||
357 | // } | ||
358 | attributes::outer_attributes(p); | ||
359 | |||
360 | // test match_arms_commas | 345 | // test match_arms_commas |
361 | // fn foo() { | 346 | // fn foo() { |
362 | // match () { | 347 | // match () { |
@@ -387,6 +372,21 @@ pub(crate) fn match_arm_list(p: &mut Parser) { | |||
387 | // } | 372 | // } |
388 | fn match_arm(p: &mut Parser) -> BlockLike { | 373 | fn match_arm(p: &mut Parser) -> BlockLike { |
389 | let m = p.start(); | 374 | let m = p.start(); |
375 | // test match_arms_outer_attributes | ||
376 | // fn foo() { | ||
377 | // match () { | ||
378 | // #[cfg(feature = "some")] | ||
379 | // _ => (), | ||
380 | // #[cfg(feature = "other")] | ||
381 | // _ => (), | ||
382 | // #[cfg(feature = "many")] | ||
383 | // #[cfg(feature = "attributes")] | ||
384 | // #[cfg(feature = "before")] | ||
385 | // _ => (), | ||
386 | // } | ||
387 | // } | ||
388 | attributes::outer_attributes(p); | ||
389 | |||
390 | patterns::pattern_list_r(p, TokenSet::empty()); | 390 | patterns::pattern_list_r(p, TokenSet::empty()); |
391 | if p.at(IF_KW) { | 391 | if p.at(IF_KW) { |
392 | match_guard(p); | 392 | match_guard(p); |