Fix handling of closing scopes in FindNextof (#977)

This commit is contained in:
Jon Meow authored and GitHub committed 2021-12-09 08:10:36 -08:00
1 parent a562f872e7
commit 97ce1f5449
6 files changed
+20 -2

No files matched your search

+2
View File
@@ -347,6 +347,8 @@ auto ParseTree::Parser::FindNextOf(
} else if (kind.IsOpeningSymbol()) {
new_position =
TokenizedBuffer::TokenIterator(tokens_.GetMatchedClosingToken(token));
// Advance past the closing token.
++new_position;
} else {
++new_position;
}