Skip to content

Commit c495e3f

Browse files
committed
fix: emit parser error for missing argument list
1 parent 0113bc9 commit c495e3f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/parser/src/grammar/expressions.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,9 @@ fn method_call_expr<const FLOAT_RECOVERY: bool>(
530530
generic_args::opt_generic_arg_list(p, true);
531531
if p.at(T!['(']) {
532532
arg_list(p);
533+
} else {
534+
// emit an error when argument list is missing
535+
p.error("expected argument list");
533536
}
534537
m.complete(p, METHOD_CALL_EXPR)
535538
}

0 commit comments

Comments
 (0)