Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse support for tuple patterns in var and let #3448

Merged
merged 7 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Richard Smith <[email protected]>
  • Loading branch information
geoffromer and zygoloid authored Dec 6, 2023
commit 2502962d54b6c71e65f17fe99c21ac476c027ef6
1 change: 0 additions & 1 deletion toolchain/check/handle_binding_pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace Carbon::Check {

auto HandleAddress(Context& context, Parse::NodeId parse_node) -> bool {
// TODO: diagnose if this occurs outside an implicit parameter list
auto self_param_id =
context.node_stack().Peek<Parse::NodeKind::BindingPattern>();
if (auto self_param =
Expand Down
3 changes: 1 addition & 2 deletions toolchain/check/handle_let.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ namespace Carbon::Check {

auto HandleLetDecl(Context& context, Parse::NodeId parse_node) -> bool {
auto value_id = context.node_stack().PopExpr();
if (context.parse_tree().node_kind(context.node_stack().PeekParseNode()) ==
Parse::NodeKind::ParamList) {
if (context.node_stack().PeekIs<Parse::NodeKind::ParamList>()) {
return context.TODO(parse_node, "tuple pattern in let");
}
SemIR::InstId pattern_id =
Expand Down