mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 19:16:46 +00:00
Start adding var decls to semantics. (#2447)
This is just the declaration, without initialization. Partly breaking it out because I'm changing the placeholder builtin types. Might also need to separate out storage of the var from the name bind.
This commit is contained in:
1 parent
04f0288cd2
commit
30960d11a9
7 files changed
+130
-17
No files matched your search
@@ -39,16 +39,15 @@ auto SemanticsIR::MakeBuiltinIR() -> SemanticsIR {
|
||||
<< "InvalidType's type must be self-referential.";
|
||||
|
||||
auto integer_literal_type = semantics.AddNode(
|
||||
block_id, SemanticsNode::MakeBuiltin(
|
||||
SemanticsBuiltinKind::IntegerLiteralType(), type_type));
|
||||
semantics
|
||||
.cross_references_[SemanticsBuiltinKind::IntegerLiteralType().AsInt()] =
|
||||
block_id, SemanticsNode::MakeBuiltin(SemanticsBuiltinKind::IntegerType(),
|
||||
type_type));
|
||||
semantics.cross_references_[SemanticsBuiltinKind::IntegerType().AsInt()] =
|
||||
SemanticsCrossReference(BuiltinIR, block_id, integer_literal_type);
|
||||
|
||||
auto real_literal_type = semantics.AddNode(
|
||||
block_id, SemanticsNode::MakeBuiltin(
|
||||
SemanticsBuiltinKind::RealLiteralType(), type_type));
|
||||
semantics.cross_references_[SemanticsBuiltinKind::RealLiteralType().AsInt()] =
|
||||
block_id,
|
||||
SemanticsNode::MakeBuiltin(SemanticsBuiltinKind::RealType(), type_type));
|
||||
semantics.cross_references_[SemanticsBuiltinKind::RealType().AsInt()] =
|
||||
SemanticsCrossReference(BuiltinIR, block_id, real_literal_type);
|
||||
|
||||
CARBON_CHECK(semantics.node_blocks_.size() == 1)
|
||||
|
||||
Reference in new issue
Block a user