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:
Chris Lattner
2015-12-31 20:11:15 -08:00
parent 78be05921d
commit cc3f173040
15 changed files with 51 additions and 267 deletions

View File

@@ -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);
}