mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:11:12 +01:00
Finish refactoring Push/Pop for stronger type handling. (#2987)
This adds a distinction between Unused and SoloParseNode, rather than equating the two. This is intended to help identify nodes which are getting pushed but maybe don't need to be. Not totally done because I want to adjust declaration name handling due to a quirk with how it mixes Name with Expression, but almost done. Once that's done the type punning will be completely gone.
This commit is contained in:
@@ -20,7 +20,7 @@ auto SemanticsHandleGenericPatternBinding(SemanticsContext& context,
|
||||
auto SemanticsHandlePatternBinding(SemanticsContext& context,
|
||||
ParseTree::Node parse_node) -> bool {
|
||||
auto [type_node, parsed_type_id] =
|
||||
context.node_stack().PopWithParseNode<SemanticsNodeId>();
|
||||
context.node_stack().PopExpressionWithParseNode();
|
||||
auto cast_type_id = context.ExpressionAsType(type_node, parsed_type_id);
|
||||
|
||||
// Get the name.
|
||||
|
||||
Reference in New Issue
Block a user