diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-10 16:07:36 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-10 16:07:36 +0100 |
commit | fcd609862b8d5b0567bb74895ef75b02912a375d (patch) | |
tree | 4bc012bfc0c2428bc4dee692a1ea2388152a4269 /crates/ra_parser/src/grammar | |
parent | 38e0d0f3348900bb4078deb09d48c5b6483d43d6 (diff) | |
parent | 5c5bde47fb759440d007c90fd83021de538120b8 (diff) |
Merge #3926
3926: Rename some tokens r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 3 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/types.rs | 15 |
2 files changed, 15 insertions, 3 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index c486c0211..a1bd53063 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -339,7 +339,8 @@ fn expr_bp(p: &mut Parser, mut r: Restrictions, bp: u8) -> (Option<CompletedMark | |||
339 | (Some(lhs), BlockLike::NotBlock) | 339 | (Some(lhs), BlockLike::NotBlock) |
340 | } | 340 | } |
341 | 341 | ||
342 | const LHS_FIRST: TokenSet = atom::ATOM_EXPR_FIRST.union(token_set![AMP, STAR, EXCL, DOT, MINUS]); | 342 | const LHS_FIRST: TokenSet = |
343 | atom::ATOM_EXPR_FIRST.union(token_set![T![&], T![*], T![!], T![.], T![-]]); | ||
343 | 344 | ||
344 | fn lhs(p: &mut Parser, r: Restrictions) -> Option<(CompletedMarker, BlockLike)> { | 345 | fn lhs(p: &mut Parser, r: Restrictions) -> Option<(CompletedMarker, BlockLike)> { |
345 | let m; | 346 | let m; |
diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs index 386969d2d..fe1a039cb 100644 --- a/crates/ra_parser/src/grammar/types.rs +++ b/crates/ra_parser/src/grammar/types.rs | |||
@@ -3,8 +3,19 @@ | |||
3 | use super::*; | 3 | use super::*; |
4 | 4 | ||
5 | pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(token_set![ | 5 | pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(token_set![ |
6 | L_PAREN, EXCL, STAR, L_BRACK, AMP, UNDERSCORE, FN_KW, UNSAFE_KW, EXTERN_KW, FOR_KW, IMPL_KW, | 6 | T!['('], |
7 | DYN_KW, L_ANGLE, | 7 | T!['['], |
8 | T![<], | ||
9 | T![!], | ||
10 | T![*], | ||
11 | T![&], | ||
12 | T![_], | ||
13 | T![fn], | ||
14 | T![unsafe], | ||
15 | T![extern], | ||
16 | T![for], | ||
17 | T![impl], | ||
18 | T![dyn], | ||
8 | ]); | 19 | ]); |
9 | 20 | ||
10 | const TYPE_RECOVERY_SET: TokenSet = token_set![R_PAREN, COMMA, L_DOLLAR]; | 21 | const TYPE_RECOVERY_SET: TokenSet = token_set![R_PAREN, COMMA, L_DOLLAR]; |