From a67fe4ea7e623ef31228295aedafb3bd18f4a23d Mon Sep 17 00:00:00 2001 From: pcpthm Date: Sun, 17 Mar 2019 20:57:27 +0900 Subject: Fix parse tree of attribute on match arm --- crates/ra_parser/src/grammar/expressions/atom.rs | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'crates/ra_parser/src/grammar/expressions') 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) { continue; } - // test match_arms_outer_attributes - // fn foo() { - // match () { - // #[cfg(feature = "some")] - // _ => (), - // #[cfg(feature = "other")] - // _ => (), - // #[cfg(feature = "many")] - // #[cfg(feature = "attributes")] - // #[cfg(feature = "before")] - // _ => (), - // } - // } - attributes::outer_attributes(p); - // test match_arms_commas // fn foo() { // match () { @@ -387,6 +372,21 @@ pub(crate) fn match_arm_list(p: &mut Parser) { // } fn match_arm(p: &mut Parser) -> BlockLike { let m = p.start(); + // test match_arms_outer_attributes + // fn foo() { + // match () { + // #[cfg(feature = "some")] + // _ => (), + // #[cfg(feature = "other")] + // _ => (), + // #[cfg(feature = "many")] + // #[cfg(feature = "attributes")] + // #[cfg(feature = "before")] + // _ => (), + // } + // } + attributes::outer_attributes(p); + patterns::pattern_list_r(p, TokenSet::empty()); if p.at(IF_KW) { match_guard(p); -- cgit v1.2.3