Support a blank expression before a semicolon
This commit is contained in:
@@ -42,6 +42,11 @@ pub(crate) fn block(p: &mut Parser) {
|
|||||||
}
|
}
|
||||||
let m = p.start();
|
let m = p.start();
|
||||||
p.bump();
|
p.bump();
|
||||||
|
// test nocontentexpr
|
||||||
|
// fn foo(){
|
||||||
|
// ;;;some_expr();;;;{;;;};;;;Ok(())
|
||||||
|
// }
|
||||||
|
while p.eat(SEMI) {}
|
||||||
while !p.at(EOF) && !p.at(R_CURLY) {
|
while !p.at(EOF) && !p.at(R_CURLY) {
|
||||||
match p.current() {
|
match p.current() {
|
||||||
LET_KW => let_stmt(p),
|
LET_KW => let_stmt(p),
|
||||||
@@ -89,6 +94,7 @@ pub(crate) fn block(p: &mut Parser) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
while p.eat(SEMI) {}
|
||||||
}
|
}
|
||||||
p.expect(R_CURLY);
|
p.expect(R_CURLY);
|
||||||
m.complete(p, BLOCK);
|
m.complete(p, BLOCK);
|
||||||
|
|||||||
Reference in New Issue
Block a user