Parse support for tuple patterns in var and let (#3448)

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Geoff Romer
2023-12-08 01:16:03 +00:00
committed by GitHub
co-authored by Richard Smith
parent 8ace1dcb78
commit 39750b9925
27 changed files with 181 additions and 104 deletions
-10
View File
@@ -166,16 +166,6 @@ auto Context::ConsumeIf(Lex::TokenKind kind) -> std::optional<Lex::TokenIndex> {
return Consume();
}
auto Context::ConsumeIfBindingPatternKeyword(Lex::TokenKind keyword_token,
State keyword_state,
int subtree_start) -> void {
if (auto token = ConsumeIf(keyword_token)) {
PushState(Context::StateStackEntry(
keyword_state, PrecedenceGroup::ForTopLevelExpr(),
PrecedenceGroup::ForTopLevelExpr(), *token, subtree_start));
}
}
auto Context::FindNextOf(std::initializer_list<Lex::TokenKind> desired_kinds)
-> std::optional<Lex::TokenIndex> {
auto new_position = position_;