aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
diff options
context:
space:
mode:
authorpcpthm <[email protected]>2019-03-17 11:57:27 +0000
committerpcpthm <[email protected]>2019-03-17 11:57:27 +0000
commita67fe4ea7e623ef31228295aedafb3bd18f4a23d (patch)
tree76a3434979cc4895dd4f6ca377e59ce031834a9e /crates/ra_parser/src
parentaea9c98f53c66cac350781c3c531ef11cef861b6 (diff)
Fix parse tree of attribute on match arm
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs30
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// }
388fn match_arm(p: &mut Parser) -> BlockLike { 373fn 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);