mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Parse support for tuple patterns in var and let (#3448)
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
8ace1dcb78
commit
39750b9925
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user