Refactor semantics logic into separate files. (#2819)

This echoes #2818 and the philosophy is mostly covered there.

Versus parsing, semantics uses fewer separate handler files (for now) because the logic has been shorter. However, the design is still intended to make it easy to split files along boundaries similar to the parser, as I've done for a couple more complex/inter-related sections.
This commit is contained in:
Jon Ross-Perkins
2023-05-15 14:45:16 -07:00
committed by GitHub
parent c9d2335a34
commit 77385aa344
15 changed files with 1523 additions and 1416 deletions
@@ -0,0 +1,30 @@
// 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
#include "toolchain/semantics/semantics_context.h"
namespace Carbon {
auto SemanticsHandleInterfaceDeclaration(SemanticsContext& context,
ParseTree::Node parse_node) -> bool {
return context.TODO(parse_node, "HandleInterfaceDeclaration");
}
auto SemanticsHandleInterfaceDefinition(SemanticsContext& context,
ParseTree::Node parse_node) -> bool {
return context.TODO(parse_node, "HandleInterfaceDefinition");
}
auto SemanticsHandleInterfaceDefinitionStart(SemanticsContext& context,
ParseTree::Node parse_node)
-> bool {
return context.TODO(parse_node, "HandleInterfaceDefinitionStart");
}
auto SemanticsHandleInterfaceIntroducer(SemanticsContext& context,
ParseTree::Node parse_node) -> bool {
return context.TODO(parse_node, "HandleInterfaceIntroducer");
}
} // namespace Carbon