Files
carbon-lang/toolchain/semantics/BUILD
T
Jon Ross-Perkins 9e1a5cfaee Reuse EnumBase for interpreter's Builtin enum (#2688)
This was bugging me after I saw all the strings; it feels like this is why we have EnumBase on the toolchain side.

I've included the move of EnumBase to //common because I figured it's reasonable to evaluate together; if we don't want EnumBase in this case, it doesn't make sense to move.
2023-03-17 08:40:43 -07:00

108 lines
2.9 KiB
Python

# 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
package(default_visibility = ["//visibility:public"])
cc_library(
name = "semantics_builtin_kind",
srcs = ["semantics_builtin_kind.cpp"],
hdrs = ["semantics_builtin_kind.h"],
textual_hdrs = ["semantics_builtin_kind.def"],
deps = ["//common:enum_base"],
)
cc_library(
name = "semantics_node_kind",
srcs = ["semantics_node_kind.cpp"],
hdrs = ["semantics_node_kind.h"],
textual_hdrs = ["semantics_node_kind.def"],
deps = ["//common:enum_base"],
)
cc_library(
name = "semantics_node",
srcs = ["semantics_node.cpp"],
hdrs = ["semantics_node.h"],
deps = [
":semantics_builtin_kind",
":semantics_node_kind",
"//common:check",
"//common:ostream",
"//toolchain/parser:parse_tree",
"@llvm-project//llvm:Support",
],
)
cc_library(
name = "semantics_node_block_stack",
srcs = ["semantics_node_block_stack.cpp"],
hdrs = ["semantics_node_block_stack.h"],
deps = [
":semantics_node",
"//common:check",
"//common:ostream",
"//common:vlog",
"@llvm-project//llvm:Support",
],
)
cc_library(
name = "semantics_node_stack",
srcs = ["semantics_node_stack.cpp"],
hdrs = ["semantics_node_stack.h"],
deps = [
":semantics_node",
"//common:check",
"//common:ostream",
"//common:vlog",
"//toolchain/parser:parse_node_kind",
"//toolchain/parser:parse_tree",
"@llvm-project//llvm:Support",
],
)
cc_library(
name = "semantics_ir",
srcs = [
"semantics_ir.cpp",
"semantics_parse_tree_handler.cpp",
],
hdrs = [
"semantics_ir.h",
"semantics_parse_tree_handler.h",
],
deps = [
":semantics_builtin_kind",
":semantics_node",
":semantics_node_block_stack",
":semantics_node_stack",
"//common:check",
"//common:ostream",
"//common:vlog",
"//toolchain/diagnostics:diagnostic_kind",
"//toolchain/lexer:numeric_literal",
"//toolchain/lexer:token_kind",
"//toolchain/lexer:tokenized_buffer",
"//toolchain/parser:parse_node_kind",
"//toolchain/parser:parse_tree",
"//toolchain/parser:parse_tree_node_location_translator",
"@llvm-project//llvm:Support",
],
)
cc_test(
name = "semantics_ir_test",
size = "small",
srcs = ["semantics_ir_test.cpp"],
deps = [
":semantics_ir",
"//common:gtest_main",
"//toolchain/common:yaml_test_helpers",
"//toolchain/diagnostics:diagnostic_emitter",
"//toolchain/lexer:tokenized_buffer",
"@com_google_googletest//:gtest",
"@llvm-project//llvm:Support",
],
)