aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/expressions.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-02-08 11:49:43 +0000
committerAleksey Kladov <[email protected]>2019-02-08 11:49:43 +0000
commit12e3b4c70b5ef23b2fdfc197296d483680e125f9 (patch)
tree71baa0e0a62f9f6b61450501c5f821f67badf9e4 /crates/ra_syntax/src/grammar/expressions.rs
parent5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff)
reformat the world
Diffstat (limited to 'crates/ra_syntax/src/grammar/expressions.rs')
-rw-r--r--crates/ra_syntax/src/grammar/expressions.rs15
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::*;
7const EXPR_FIRST: TokenSet = LHS_FIRST; 7const EXPR_FIRST: TokenSet = LHS_FIRST;
8 8
9pub(super) fn expr(p: &mut Parser) -> BlockLike { 9pub(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
17pub(super) fn expr_stmt(p: &mut Parser) -> BlockLike { 14pub(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
25fn expr_no_struct(p: &mut Parser) { 19fn 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