Fix error blocks

This commit is contained in:
Aleksey Kladov
2018-08-27 21:10:02 +03:00
parent 7f4b07a907
commit b79c8b6d8a
6 changed files with 20 additions and 1 deletions

View File

@@ -269,6 +269,10 @@ fn match_arm_list(p: &mut Parser) {
let m = p.start();
p.eat(L_CURLY);
while !p.at(EOF) && !p.at(R_CURLY) {
if p.at(L_CURLY) {
error_block(p, "expected match arm");
continue;
}
// test match_arms_commas
// fn foo() {
// match () {