| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- # 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 = ["//executable_semantics:__subpackages__"])
- cc_library(
- name = "ast",
- hdrs = ["ast.h"],
- deps = [
- ":declaration",
- ":library_name",
- "//executable_semantics/common:nonnull",
- ],
- )
- cc_library(
- name = "ast_node",
- srcs = ["ast_node.cpp"],
- hdrs = [
- "ast_node.h",
- "ast_rtti.h",
- ],
- deps = [
- ":source_location",
- "@llvm-project//llvm:Support",
- ],
- )
- genrule(
- name = "ast_rtti",
- srcs = ["ast_rtti.txt"],
- outs = ["ast_rtti.h"],
- cmd = "./$(location //executable_semantics:gen_rtti)" +
- " $(location ast_rtti.txt) > \"$@\"",
- tools = ["//executable_semantics:gen_rtti"],
- )
- cc_library(
- name = "ast_test_matchers",
- testonly = 1,
- srcs = [
- "ast_test_matchers_internal.cpp",
- "ast_test_matchers_internal.h",
- ],
- hdrs = ["ast_test_matchers.h"],
- deps = [
- ":ast",
- ":ast_node",
- ":declaration",
- ":expression",
- ":statement",
- "@com_google_googletest//:gtest",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_test(
- name = "ast_test_matchers_test",
- srcs = ["ast_test_matchers_test.cpp"],
- deps = [
- ":ast_test_matchers",
- ":declaration",
- ":expression",
- ":pattern",
- ":statement",
- "//executable_semantics/common:arena",
- "@com_google_googletest//:gtest_main",
- ],
- )
- cc_library(
- name = "declaration",
- srcs = ["declaration.cpp"],
- hdrs = [
- "declaration.h",
- ],
- deps = [
- ":ast_node",
- ":member",
- ":pattern",
- ":source_location",
- ":statement",
- ":static_scope",
- ":value_category",
- "//common:ostream",
- "//executable_semantics/common:nonnull",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "expression",
- srcs = ["expression.cpp"],
- hdrs = ["expression.h"],
- deps = [
- ":ast_node",
- ":paren_contents",
- ":source_location",
- ":static_scope",
- ":value_category",
- "//common:indirect_value",
- "//common:ostream",
- "//executable_semantics/common:arena",
- "//executable_semantics/common:error",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_test(
- name = "expression_test",
- srcs = ["expression_test.cpp"],
- deps = [
- ":expression",
- ":paren_contents",
- "//executable_semantics/common:arena",
- "@com_google_googletest//:gtest_main",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "member",
- srcs = ["member.cpp"],
- hdrs = ["member.h"],
- deps = [
- ":expression",
- ":pattern",
- ":source_location",
- "//common:ostream",
- "//executable_semantics/common:arena",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "library_name",
- hdrs = ["library_name.h"],
- )
- cc_library(
- name = "paren_contents",
- hdrs = ["paren_contents.h"],
- deps = [
- ":source_location",
- "//executable_semantics/common:error",
- ],
- )
- cc_library(
- name = "pattern",
- srcs = ["pattern.cpp"],
- hdrs = ["pattern.h"],
- deps = [
- ":ast_node",
- ":expression",
- ":source_location",
- ":static_scope",
- ":value_category",
- "//common:ostream",
- "//executable_semantics/common:arena",
- "//executable_semantics/common:error",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_test(
- name = "pattern_test",
- srcs = ["pattern_test.cpp"],
- deps = [
- ":expression",
- ":paren_contents",
- ":pattern",
- "//executable_semantics/common:arena",
- "@com_google_googletest//:gtest_main",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "static_scope",
- srcs = ["static_scope.cpp"],
- hdrs = ["static_scope.h"],
- deps = [
- ":ast_node",
- ":source_location",
- ":value_category",
- "//common:check",
- "//executable_semantics/common:arena",
- "//executable_semantics/common:error",
- "//executable_semantics/common:nonnull",
- ],
- )
- cc_library(
- name = "source_location",
- hdrs = ["source_location.h"],
- deps = [
- "//common:ostream",
- "//executable_semantics/common:nonnull",
- ],
- )
- cc_library(
- name = "statement",
- srcs = ["statement.cpp"],
- hdrs = ["statement.h"],
- deps = [
- ":ast_node",
- ":expression",
- ":pattern",
- ":source_location",
- ":static_scope",
- ":value_category",
- "//common:check",
- "//common:ostream",
- "//executable_semantics/common:arena",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "value_category",
- hdrs = ["value_category.h"],
- )
|