fix stuck parser

This commit is contained in:
Aleksey Kladov 2018-09-08 10:13:32 +03:00
parent 44334f6f56
commit bd3a26493f
7 changed files with 719 additions and 2 deletions

View file

@ -376,6 +376,10 @@ fn arg_list(p: &mut Parser) {
let m = p.start();
p.bump();
while !p.at(R_PAREN) && !p.at(EOF) {
if !EXPR_FIRST.contains(p.current()) {
p.error("expected expression");
break;
}
expr(p);
if !p.at(R_PAREN) && !p.expect(COMMA) {
break;