mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-20 09:26:43 +00: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:
1 parent
6a2b9684fb
commit
43065a1257
13 files changed
+122
-112
No files matched your search
@@ -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