mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "Preserve whitespace and comments during lexing as Trivia"
This reverts commit d6e2b58382.
This commit is contained in:
@@ -129,7 +129,7 @@ static bool startsParameterName(Parser &parser, bool isClosure) {
|
||||
return false;
|
||||
|
||||
// If the next token can be an argument label or is ':', this is a name.
|
||||
auto nextTok = parser.peekToken();
|
||||
const auto &nextTok = parser.peekToken();
|
||||
if (nextTok.is(tok::colon) || nextTok.canBeArgumentLabel())
|
||||
return true;
|
||||
|
||||
@@ -302,7 +302,7 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
|
||||
{
|
||||
BacktrackingScope backtrack(*this);
|
||||
isBareType = canParseType() && Tok.isAny(tok::comma, tok::r_paren,
|
||||
tok::equal);
|
||||
tok::equal);
|
||||
}
|
||||
|
||||
if (isBareType) {
|
||||
|
||||
Reference in New Issue
Block a user