[Parser] Replace postfix ellipsis with a prefix 'repeat' keyword for pack

expansion expressions, and create them in the parser instead of during
pre-checking in the constraint system.
This commit is contained in:
Holly Borla
2022-12-22 00:57:47 -05:00
parent f5f8e82815
commit 89fa17d74c
9 changed files with 73 additions and 88 deletions

View File

@@ -163,7 +163,8 @@ bool Parser::startsParameterName(bool isClosure) {
if (!Tok.isContextualKeyword("isolated") &&
!Tok.isContextualKeyword("some") &&
!Tok.isContextualKeyword("any") &&
!Tok.isContextualKeyword("each"))
!Tok.isContextualKeyword("each") &&
!Tok.is(tok::kw_repeat))
return true;
// "isolated" can be an argument label, but it's also a contextual keyword,