From 1d1950336fecd45962b1435385e17584478aa578 Mon Sep 17 00:00:00 2001
From: DJMcNab <36049421+DJMcNab@users.noreply.github.com>
Date: Thu, 20 Dec 2018 18:39:38 +0000
Subject: Use a better way of skipping SEMIs

---
 crates/ra_syntax/src/grammar/expressions.rs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'crates/ra_syntax')

diff --git a/crates/ra_syntax/src/grammar/expressions.rs b/crates/ra_syntax/src/grammar/expressions.rs
index 67fc17667..da78d85a2 100644
--- a/crates/ra_syntax/src/grammar/expressions.rs
+++ b/crates/ra_syntax/src/grammar/expressions.rs
@@ -42,14 +42,15 @@ pub(crate) fn block(p: &mut Parser) {
     }
     let m = p.start();
     p.bump();
-    // test nocontentexpr
-    // fn foo(){
-    //     ;;;some_expr();;;;{;;;};;;;Ok(())
-    // }
-    while p.eat(SEMI) {}
+
     while !p.at(EOF) && !p.at(R_CURLY) {
         match p.current() {
             LET_KW => let_stmt(p),
+            // test nocontentexpr
+            // fn foo(){
+            //     ;;;some_expr();;;;{;;;};;;;Ok(())
+            // }
+            SEMI => p.bump(),
             _ => {
                 // test block_items
                 // fn a() { fn b() {} }
@@ -94,7 +95,6 @@ pub(crate) fn block(p: &mut Parser) {
                 }
             }
         }
-        while p.eat(SEMI) {}
     }
     p.expect(R_CURLY);
     m.complete(p, BLOCK);
-- 
cgit v1.2.3