diff options
author | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
commit | 12e3b4c70b5ef23b2fdfc197296d483680e125f9 (patch) | |
tree | 71baa0e0a62f9f6b61450501c5f821f67badf9e4 /crates/ra_syntax/src/grammar/expressions.rs | |
parent | 5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff) |
reformat the world
Diffstat (limited to 'crates/ra_syntax/src/grammar/expressions.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/expressions.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/crates/ra_syntax/src/grammar/expressions.rs b/crates/ra_syntax/src/grammar/expressions.rs index 6b88c5685..28fcb1f7d 100644 --- a/crates/ra_syntax/src/grammar/expressions.rs +++ b/crates/ra_syntax/src/grammar/expressions.rs | |||
@@ -7,26 +7,17 @@ use super::*; | |||
7 | const EXPR_FIRST: TokenSet = LHS_FIRST; | 7 | const EXPR_FIRST: TokenSet = LHS_FIRST; |
8 | 8 | ||
9 | pub(super) fn expr(p: &mut Parser) -> BlockLike { | 9 | pub(super) fn expr(p: &mut Parser) -> BlockLike { |
10 | let r = Restrictions { | 10 | let r = Restrictions { forbid_structs: false, prefer_stmt: false }; |
11 | forbid_structs: false, | ||
12 | prefer_stmt: false, | ||
13 | }; | ||
14 | expr_bp(p, r, 1) | 11 | expr_bp(p, r, 1) |
15 | } | 12 | } |
16 | 13 | ||
17 | pub(super) fn expr_stmt(p: &mut Parser) -> BlockLike { | 14 | pub(super) fn expr_stmt(p: &mut Parser) -> BlockLike { |
18 | let r = Restrictions { | 15 | let r = Restrictions { forbid_structs: false, prefer_stmt: true }; |
19 | forbid_structs: false, | ||
20 | prefer_stmt: true, | ||
21 | }; | ||
22 | expr_bp(p, r, 1) | 16 | expr_bp(p, r, 1) |
23 | } | 17 | } |
24 | 18 | ||
25 | fn expr_no_struct(p: &mut Parser) { | 19 | fn expr_no_struct(p: &mut Parser) { |
26 | let r = Restrictions { | 20 | let r = Restrictions { forbid_structs: true, prefer_stmt: false }; |
27 | forbid_structs: true, | ||
28 | prefer_stmt: false, | ||
29 | }; | ||
30 | expr_bp(p, r, 1); | 21 | expr_bp(p, r, 1); |
31 | } | 22 | } |
32 | 23 | ||