aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/patterns.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/grammar/patterns.rs')
-rw-r--r--crates/libsyntax2/src/grammar/patterns.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/grammar/patterns.rs b/crates/libsyntax2/src/grammar/patterns.rs
index 7ddbfa318..11852e0d3 100644
--- a/crates/libsyntax2/src/grammar/patterns.rs
+++ b/crates/libsyntax2/src/grammar/patterns.rs
@@ -1,5 +1,12 @@
1use super::*; 1use super::*;
2 2
3pub(super) const PATTERN_FIRST: TokenSet =
4 token_set_union![
5 token_set![REF_KW, MUT_KW, L_PAREN, L_BRACK, AMP],
6 expressions::LITERAL_FIRST,
7 paths::PATH_FIRST,
8 ];
9
3pub(super) fn pattern(p: &mut Parser) { 10pub(super) fn pattern(p: &mut Parser) {
4 if let Some(lhs) = atom_pat(p) { 11 if let Some(lhs) = atom_pat(p) {
5 // test range_pat 12 // test range_pat