mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:14:42 +01:00
Binding pattern naming cleanup (#3410)
- Rename `PatternBinding` to `BindingPattern`. - Use `BindingPattern` rather than `Pattern` in the names of binding-pattern-specific parse states.
This commit is contained in:
@@ -34,7 +34,7 @@ auto HandleVariableDecl(Context& context, Parse::NodeId parse_node) -> bool {
|
||||
auto init_id = SemIR::InstId::Invalid;
|
||||
bool has_init =
|
||||
context.parse_tree().node_kind(context.node_stack().PeekParseNode()) !=
|
||||
Parse::NodeKind::PatternBinding;
|
||||
Parse::NodeKind::BindingPattern;
|
||||
if (has_init) {
|
||||
init_id = context.node_stack().PopExpr();
|
||||
context.node_stack()
|
||||
@@ -42,7 +42,7 @@ auto HandleVariableDecl(Context& context, Parse::NodeId parse_node) -> bool {
|
||||
}
|
||||
|
||||
// Extract the name binding.
|
||||
auto value_id = context.node_stack().Pop<Parse::NodeKind::PatternBinding>();
|
||||
auto value_id = context.node_stack().Pop<Parse::NodeKind::BindingPattern>();
|
||||
if (auto bind_name = context.insts().Get(value_id).TryAs<SemIR::BindName>()) {
|
||||
// Form a corresponding name in the current context, and bind the name to
|
||||
// the variable.
|
||||
|
||||
Reference in New Issue
Block a user