Use a better way of skipping SEMIs
This commit is contained in:
parent
dc1c64f5b9
commit
1d1950336f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user