diff options
author | Michael Chesser <[email protected]> | 2019-03-13 23:38:49 +0000 |
---|---|---|
committer | Michael Chesser <[email protected]> | 2019-03-14 08:54:11 +0000 |
commit | 16418c35bc18be6b77a379c2f460bb76f2cc7acd (patch) | |
tree | 744c487841bb8dc6b9440a9e7b2d0e928641ffe1 /crates/ra_parser/src/grammar | |
parent | f7065c294c24b48014f2b2594126dad4a43caee8 (diff) |
Allow MINUS at the start of a pattern.
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/patterns.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/patterns.rs b/crates/ra_parser/src/grammar/patterns.rs index befe6687d..9a307559b 100644 --- a/crates/ra_parser/src/grammar/patterns.rs +++ b/crates/ra_parser/src/grammar/patterns.rs | |||
@@ -2,7 +2,7 @@ use super::*; | |||
2 | 2 | ||
3 | pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST | 3 | pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST |
4 | .union(paths::PATH_FIRST) | 4 | .union(paths::PATH_FIRST) |
5 | .union(token_set![REF_KW, MUT_KW, L_PAREN, L_BRACK, AMP, UNDERSCORE]); | 5 | .union(token_set![REF_KW, MUT_KW, L_PAREN, L_BRACK, AMP, UNDERSCORE, MINUS]); |
6 | 6 | ||
7 | pub(super) fn pattern(p: &mut Parser) { | 7 | pub(super) fn pattern(p: &mut Parser) { |
8 | pattern_r(p, PAT_RECOVERY_SET) | 8 | pattern_r(p, PAT_RECOVERY_SET) |