mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 17:40:10 +01:00
As a step towards builtins, provide more blocks. The intent is that any significant scope change will become its own NodeBlock. Builtins should produce the first set of node blocks. Note, SemanticsIR as set up here isn't handling ordering of import processing -- I haven't thought that through much beyond that we probably want some lighter-weight processing of the parse tree to achieve it. But I think the essence of loading builtins first as their own IR block is... probably right?
23 lines
726 B
Plaintext
23 lines
726 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
// RUN: %{carbon-run-semantics}
|
|
// CHECK:STDOUT: identifiers = {
|
|
// CHECK:STDOUT: ident0 = "Foo";
|
|
// CHECK:STDOUT: },
|
|
// CHECK:STDOUT: integer_literals = {
|
|
// CHECK:STDOUT: },
|
|
// CHECK:STDOUT: node_blocks = {
|
|
// CHECK:STDOUT: block0 = {
|
|
// CHECK:STDOUT: node0 = Identifier(ident0);
|
|
// CHECK:STDOUT: node1 = FunctionDeclaration(node0);
|
|
// CHECK:STDOUT: node2 = FunctionDefinition(node1, block1);
|
|
// CHECK:STDOUT: },
|
|
// CHECK:STDOUT: block1 = {
|
|
// CHECK:STDOUT: },
|
|
// CHECK:STDOUT: }
|
|
|
|
fn Foo() {}
|