mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Finish splitting out semantics_handle.cpp (#2976)
I was running into some difficult merges in #2940, so I'm wanting to finish splitting this last file to minimize the chance of future issues.
This commit is contained in:
@@ -94,4 +94,14 @@ auto SemanticsHandleFunctionIntroducer(SemanticsContext& context,
|
||||
return true;
|
||||
}
|
||||
|
||||
auto SemanticsHandleReturnType(SemanticsContext& context,
|
||||
ParseTree::Node parse_node) -> bool {
|
||||
// Propagate the type expression.
|
||||
auto [type_parse_node, type_node_id] =
|
||||
context.node_stack().PopWithParseNode<SemanticsNodeId>();
|
||||
auto cast_node_id = context.ExpressionAsType(type_parse_node, type_node_id);
|
||||
context.node_stack().Push(parse_node, cast_node_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Carbon
|
||||
|
||||
Reference in New Issue
Block a user