aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorDJMcNab <[email protected]>2019-01-24 21:31:43 +0000
committerDJMcNab <[email protected]>2019-01-24 21:31:43 +0000
commitf0e5a314b029216c4f9446aa6ba34c4b842db23e (patch)
treeedf3873fae46cf4df262ecfa209b136179d2c590 /crates/ra_syntax
parent4899e7be76c5c8309222c8afe1c0f74dc59a4345 (diff)
Dedupe PATH_FIRST in ATOM_EXPR_FIRST
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/grammar/expressions/atom.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_syntax/src/grammar/expressions/atom.rs b/crates/ra_syntax/src/grammar/expressions/atom.rs
index 5feca090c..5072d2c49 100644
--- a/crates/ra_syntax/src/grammar/expressions/atom.rs
+++ b/crates/ra_syntax/src/grammar/expressions/atom.rs
@@ -1,4 +1,5 @@
1use super::*; 1use super::*;
2use crate::grammar::paths::PATH_FIRST;
2 3
3// test expr_literals 4// test expr_literals
4// fn foo() { 5// fn foo() {
@@ -36,11 +37,10 @@ pub(crate) fn literal(p: &mut Parser) -> Option<CompletedMarker> {
36} 37}
37 38
38// E.g. for after the break in `if break {}`, this should not match 39// E.g. for after the break in `if break {}`, this should not match
39pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(token_set![ 40pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(PATH_FIRST).union(token_set![
40 L_PAREN, 41 L_PAREN,
41 L_CURLY, 42 L_CURLY,
42 L_BRACK, 43 L_BRACK,
43 L_ANGLE, // Universal function call syntax
44 PIPE, 44 PIPE,
45 MOVE_KW, 45 MOVE_KW,
46 IF_KW, 46 IF_KW,
@@ -48,11 +48,6 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(token_set![
48 MATCH_KW, 48 MATCH_KW,
49 UNSAFE_KW, 49 UNSAFE_KW,
50 RETURN_KW, 50 RETURN_KW,
51 IDENT,
52 SELF_KW,
53 SUPER_KW,
54 CRATE_KW,
55 COLONCOLON,
56 BREAK_KW, 51 BREAK_KW,
57 CONTINUE_KW, 52 CONTINUE_KW,
58 LIFETIME, 53 LIFETIME,