aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/expressions/atom.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/grammar/expressions/atom.rs')
-rw-r--r--crates/ra_syntax/src/grammar/expressions/atom.rs45
1 files changed, 21 insertions, 24 deletions
diff --git a/crates/ra_syntax/src/grammar/expressions/atom.rs b/crates/ra_syntax/src/grammar/expressions/atom.rs
index 31b09ac5b..167a76551 100644
--- a/crates/ra_syntax/src/grammar/expressions/atom.rs
+++ b/crates/ra_syntax/src/grammar/expressions/atom.rs
@@ -36,29 +36,26 @@ pub(crate) fn literal(p: &mut Parser) -> Option<CompletedMarker> {
36} 36}
37 37
38// E.g. for after the break in `if break {}`, this should not match 38// E.g. for after the break in `if break {}`, this should not match
39pub(super) const ATOM_EXPR_FIRST: TokenSet = token_set_union![ 39pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(token_set![
40 LITERAL_FIRST, 40 L_PAREN,
41 token_set![ 41 L_CURLY,
42 L_PAREN, 42 L_BRACK,
43 L_CURLY, 43 PIPE,
44 L_BRACK, 44 MOVE_KW,
45 PIPE, 45 IF_KW,
46 MOVE_KW, 46 WHILE_KW,
47 IF_KW, 47 MATCH_KW,
48 WHILE_KW, 48 UNSAFE_KW,
49 MATCH_KW, 49 RETURN_KW,
50 UNSAFE_KW, 50 IDENT,
51 RETURN_KW, 51 SELF_KW,
52 IDENT, 52 SUPER_KW,
53 SELF_KW, 53 CRATE_KW,
54 SUPER_KW, 54 COLONCOLON,
55 CRATE_KW, 55 BREAK_KW,
56 COLONCOLON, 56 CONTINUE_KW,
57 BREAK_KW, 57 LIFETIME,
58 CONTINUE_KW, 58]);
59 LIFETIME
60 ],
61];
62 59
63const EXPR_RECOVERY_SET: TokenSet = token_set![LET_KW]; 60const EXPR_RECOVERY_SET: TokenSet = token_set![LET_KW];
64 61
@@ -363,7 +360,7 @@ pub(crate) fn match_arm_list(p: &mut Parser) {
363fn match_arm(p: &mut Parser) -> BlockLike { 360fn match_arm(p: &mut Parser) -> BlockLike {
364 let m = p.start(); 361 let m = p.start();
365 p.eat(PIPE); 362 p.eat(PIPE);
366 patterns::pattern_r(p, TokenSet::EMPTY); 363 patterns::pattern_r(p, TokenSet::empty());
367 while p.eat(PIPE) { 364 while p.eat(PIPE) {
368 patterns::pattern(p); 365 patterns::pattern(p);
369 } 366 }