diff options
author | DJMcNab <[email protected]> | 2018-12-20 18:39:38 +0000 |
---|---|---|
committer | DJMcNab <[email protected]> | 2018-12-20 19:07:11 +0000 |
commit | 1d1950336fecd45962b1435385e17584478aa578 (patch) | |
tree | 558444e5e5ed30b79dea1ef35f819bda59b8b551 /crates/ra_syntax/src/grammar | |
parent | dc1c64f5b95f91e716e7535d96618cb0e3c0b2f9 (diff) |
Use a better way of skipping SEMIs
Diffstat (limited to 'crates/ra_syntax/src/grammar')
-rw-r--r-- | crates/ra_syntax/src/grammar/expressions.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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) { | |||
42 | } | 42 | } |
43 | let m = p.start(); | 43 | let m = p.start(); |
44 | p.bump(); | 44 | p.bump(); |
45 | // test nocontentexpr | 45 | |
46 | // fn foo(){ | ||
47 | // ;;;some_expr();;;;{;;;};;;;Ok(()) | ||
48 | // } | ||
49 | while p.eat(SEMI) {} | ||
50 | while !p.at(EOF) && !p.at(R_CURLY) { | 46 | while !p.at(EOF) && !p.at(R_CURLY) { |
51 | match p.current() { | 47 | match p.current() { |
52 | LET_KW => let_stmt(p), | 48 | LET_KW => let_stmt(p), |
49 | // test nocontentexpr | ||
50 | // fn foo(){ | ||
51 | // ;;;some_expr();;;;{;;;};;;;Ok(()) | ||
52 | // } | ||
53 | SEMI => p.bump(), | ||
53 | _ => { | 54 | _ => { |
54 | // test block_items | 55 | // test block_items |
55 | // fn a() { fn b() {} } | 56 | // fn a() { fn b() {} } |
@@ -94,7 +95,6 @@ pub(crate) fn block(p: &mut Parser) { | |||
94 | } | 95 | } |
95 | } | 96 | } |
96 | } | 97 | } |
97 | while p.eat(SEMI) {} | ||
98 | } | 98 | } |
99 | p.expect(R_CURLY); | 99 | p.expect(R_CURLY); |
100 | m.complete(p, BLOCK); | 100 | m.complete(p, BLOCK); |