From a55ef9b3ed66a057bb3e58ab698f26e58afb5b7d Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Wed, 3 Oct 2018 21:47:03 +0100 Subject: Support leading pipe in match arms --- crates/ra_syntax/src/grammar/expressions/atom.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_syntax/src/grammar') diff --git a/crates/ra_syntax/src/grammar/expressions/atom.rs b/crates/ra_syntax/src/grammar/expressions/atom.rs index f01df56bc..a720d255f 100644 --- a/crates/ra_syntax/src/grammar/expressions/atom.rs +++ b/crates/ra_syntax/src/grammar/expressions/atom.rs @@ -319,10 +319,13 @@ pub(crate) fn match_arm_list(p: &mut Parser) { // match () { // _ => (), // X | Y if Z => (), +// | X | Y if Z => (), +// | X => (), // }; // } fn match_arm(p: &mut Parser) -> BlockLike { let m = p.start(); + p.eat(PIPE); patterns::pattern_r(p, TokenSet::EMPTY); while p.eat(PIPE) { patterns::pattern(p); -- cgit v1.2.3