mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +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
@@ -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