mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
remove variadics, default args etc, from tuple patterns, and simplify
the Pattern::clone interface now that the complexity isn't needed. This also removes support for serializing this state.
This commit is contained in:
@@ -902,14 +902,7 @@ Parser::parsePatternTupleElement() {
|
||||
if (pattern.isNull())
|
||||
return std::make_pair(makeParserError(), None);
|
||||
|
||||
// Consume the '...'.
|
||||
SourceLoc ellipsisLoc;
|
||||
if (Tok.isEllipsis())
|
||||
ellipsisLoc = consumeToken();
|
||||
auto Elt = TuplePatternElt(Label, LabelLoc, pattern.get(),
|
||||
ellipsisLoc.isValid(), ellipsisLoc,
|
||||
nullptr, DefaultArgumentKind::None);
|
||||
|
||||
auto Elt = TuplePatternElt(Label, LabelLoc, pattern.get());
|
||||
return std::make_pair(makeParserSuccess(), Elt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user