mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Clean up some uses of the node stack. (#3512)
Also minor cleanups for the stack itself.
This commit is contained in:
@@ -57,8 +57,8 @@ auto HandleBindingPattern(Context& context, Parse::NodeId parse_node) -> bool {
|
||||
// error locations.
|
||||
// TODO: The node stack is a fragile way of getting context information.
|
||||
// Get this information from somewhere else.
|
||||
switch (auto context_parse_node_kind = context.parse_tree().node_kind(
|
||||
context.node_stack().PeekParseNode())) {
|
||||
switch (auto context_parse_node_kind =
|
||||
context.node_stack().PeekParseNodeKind()) {
|
||||
case Parse::NodeKind::ReturnedModifier:
|
||||
case Parse::NodeKind::VariableIntroducer: {
|
||||
// A `var` declaration at class scope introduces a field.
|
||||
|
||||
Reference in New Issue
Block a user