Fix bug in parsing of super expression (#1364)

This commit is contained in:
Islon Scherer
2025-12-12 18:02:48 +01:00
committed by Dan Chao
parent 36af9382c5
commit c480cc8118
3 changed files with 26 additions and 1 deletions

View File

@@ -973,7 +973,9 @@ public class Parser {
if (lookahead == Token.DOT) {
next();
var identifier = parseIdentifier();
if (lookahead == Token.LPAREN) {
if (lookahead == Token.LPAREN
&& !precededBySemicolon
&& _lookahead.newLinesBetween == 0) {
var args = parseArgumentList();
yield new SuperAccessExpr(identifier, args, start.endWith(args.span()));
} else {