aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs1
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs30
2 files changed, 16 insertions, 15 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index d8e825f46..83812e938 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -146,6 +146,7 @@ fn current_op(p: &Parser) -> (u8, Op) {
146 (PLUS, EQ) => return (1, Op::Composite(PLUSEQ, 2)), 146 (PLUS, EQ) => return (1, Op::Composite(PLUSEQ, 2)),
147 (MINUS, EQ) => return (1, Op::Composite(MINUSEQ, 2)), 147 (MINUS, EQ) => return (1, Op::Composite(MINUSEQ, 2)),
148 (STAR, EQ) => return (1, Op::Composite(STAREQ, 2)), 148 (STAR, EQ) => return (1, Op::Composite(STAREQ, 2)),
149 (PERCENT, EQ) => return (1, Op::Composite(PERCENTEQ, 2)),
149 (SLASH, EQ) => return (1, Op::Composite(SLASHEQ, 2)), 150 (SLASH, EQ) => return (1, Op::Composite(SLASHEQ, 2)),
150 (PIPE, EQ) => return (1, Op::Composite(PIPEEQ, 2)), 151 (PIPE, EQ) => return (1, Op::Composite(PIPEEQ, 2)),
151 (AMP, EQ) => return (1, Op::Composite(AMPEQ, 2)), 152 (AMP, EQ) => return (1, Op::Composite(AMPEQ, 2)),
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);