mirror of
https://github.com/apple/pkl.git
synced 2026-03-28 03:51:14 +01:00
Correctly handle trailing commas in function type literals in the generic parser (#1267)
This commit is contained in:
@@ -1169,7 +1169,11 @@ public class GenericParser {
|
||||
elements.add(parseType(")"));
|
||||
ff(elements);
|
||||
while (lookahead == Token.COMMA) {
|
||||
elements.add(makeTerminal(next()));
|
||||
var comma = next();
|
||||
if (lookahead == Token.RPAREN) {
|
||||
break;
|
||||
}
|
||||
elements.add(makeTerminal(comma));
|
||||
ff(elements);
|
||||
elements.add(parseType(")"));
|
||||
totalTypes++;
|
||||
|
||||
Reference in New Issue
Block a user