Test and improve parser error recovery for closures.

Swift SVN r5203
This commit is contained in:
Doug Gregor
2013-05-17 16:39:20 +00:00
parent 6e64ca66f0
commit fab984aeae
5 changed files with 45 additions and 9 deletions

View File

@@ -152,6 +152,10 @@ SourceLoc Parser::consumeToken() {
return Loc;
}
SourceLoc Parser::getEndOfPreviousLoc() {
return Lexer::getLocForEndOfToken(SourceMgr, PreviousLoc);
}
SourceLoc Parser::consumeStartingLess() {
assert(startsWithLess(Tok) && "Token does not start with '<'");