Allow MINUS at the start of a pattern.

This commit is contained in:
Michael Chesser 2019-03-14 10:08:49 +10:30
parent f7065c294c
commit 16418c35bc

View file

@ -2,7 +2,7 @@ use super::*;
pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST
.union(paths::PATH_FIRST) .union(paths::PATH_FIRST)
.union(token_set![REF_KW, MUT_KW, L_PAREN, L_BRACK, AMP, UNDERSCORE]); .union(token_set![REF_KW, MUT_KW, L_PAREN, L_BRACK, AMP, UNDERSCORE, MINUS]);
pub(super) fn pattern(p: &mut Parser) { pub(super) fn pattern(p: &mut Parser) {
pattern_r(p, PAT_RECOVERY_SET) pattern_r(p, PAT_RECOVERY_SET)