aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/expressions.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-05-02 10:57:45 +0100
committerGitHub <[email protected]>2020-05-02 10:57:45 +0100
commit75bc0249463b72971200e482d69dad88d4e76ae3 (patch)
treecf12a19a548f77af306bd8eeb4ba6a74175e1790 /crates/ra_parser/src/grammar/expressions.rs
parent235728319fb545670e49db996e9c2cd94b8b34eb (diff)
parentb73dbbfbf2cad646eb3f8e3342a1c390a874dc53 (diff)
Merge #4257
4257: ast::EffectExpr r=matklad a=matklad closes #4230 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/grammar/expressions.rs')
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index cb30b25a8..a23dbcacf 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -59,16 +59,7 @@ pub(crate) fn block(p: &mut Parser) {
59 p.error("expected a block"); 59 p.error("expected a block");
60 return; 60 return;
61 } 61 }
62 atom::block_expr(p, None); 62 atom::block_expr(p);
63}
64
65pub(crate) fn naked_block(p: &mut Parser) {
66 assert!(p.at(T!['{']));
67 let m = p.start();
68 p.bump(T!['{']);
69 expr_block_contents(p);
70 p.expect(T!['}']);
71 m.complete(p, BLOCK);
72} 63}
73 64
74fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool { 65fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool {
@@ -197,7 +188,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
197 } 188 }
198} 189}
199 190
200pub(crate) fn expr_block_contents(p: &mut Parser) { 191pub(super) fn expr_block_contents(p: &mut Parser) {
201 // This is checked by a validator 192 // This is checked by a validator
202 attributes::inner_attributes(p); 193 attributes::inner_attributes(p);
203 194