mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Parser: use ParserStatus in parseList()
This will allow us to do code completion inside lists (e.g., tuples) *and* get parser recovery instead of stopping at the code completion token immediately. Swift SVN r7366
This commit is contained in:
@@ -388,7 +388,14 @@ public:
|
||||
bool parseMatchingToken(tok K, SourceLoc &TokLoc, Diag<> ErrorDiag,
|
||||
SourceLoc OtherLoc);
|
||||
|
||||
/// parseList - Parse the list of statements, expressions, or declarations.
|
||||
/// \brief Parse the list of statements, expressions, or declarations.
|
||||
ParserStatus parseList(tok RightK, SourceLoc LeftLoc, SourceLoc &RightLoc,
|
||||
tok SeparatorK, bool OptionalSep, Diag<> ErrorDiag,
|
||||
std::function<ParserStatus()> callback);
|
||||
|
||||
/// \brief Parse the list of statements, expressions, or declarations.
|
||||
///
|
||||
/// \returns false on success, true on error.
|
||||
bool parseList(tok RightK, SourceLoc LeftLoc, SourceLoc &RightLoc,
|
||||
tok SeparatorK, bool OptionalSep, Diag<> ErrorDiag,
|
||||
std::function<bool()> callback);
|
||||
|
||||
Reference in New Issue
Block a user