mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01: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:
@@ -148,7 +148,7 @@ class SemanticsNode {
|
||||
-> SemanticsNode {
|
||||
return SemanticsNode(parse_node, SemanticsNodeKind::IntegerLiteral(),
|
||||
SemanticsNodeId::MakeBuiltinReference(
|
||||
SemanticsBuiltinKind::IntegerLiteralType()),
|
||||
SemanticsBuiltinKind::IntegerType()),
|
||||
integer.index);
|
||||
}
|
||||
auto GetAsIntegerLiteral() const -> SemanticsIntegerLiteralId {
|
||||
@@ -159,7 +159,7 @@ class SemanticsNode {
|
||||
static auto MakeRealLiteral(ParseTree::Node parse_node) -> SemanticsNode {
|
||||
return SemanticsNode(parse_node, SemanticsNodeKind::RealLiteral(),
|
||||
SemanticsNodeId::MakeBuiltinReference(
|
||||
SemanticsBuiltinKind::RealLiteralType()));
|
||||
SemanticsBuiltinKind::RealType()));
|
||||
}
|
||||
auto GetAsRealLiteral() const -> NoArgs {
|
||||
CARBON_CHECK(kind_ == SemanticsNodeKind::RealLiteral());
|
||||
|
||||
Reference in New Issue
Block a user