BUILD 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. package(default_visibility = ["//executable_semantics:__subpackages__"])
  5. cc_library(
  6. name = "ast",
  7. hdrs = ["ast.h"],
  8. deps = [
  9. ":declaration",
  10. ":library_name",
  11. ],
  12. )
  13. cc_library(
  14. name = "class_definition",
  15. hdrs = ["class_definition.h"],
  16. deps = [
  17. ":member",
  18. ":source_location",
  19. "//common:ostream",
  20. "@llvm-project//llvm:Support",
  21. ],
  22. )
  23. cc_library(
  24. name = "declaration",
  25. srcs = ["declaration.cpp"],
  26. hdrs = [
  27. "declaration.h",
  28. ],
  29. deps = [
  30. ":class_definition",
  31. ":function_definition",
  32. ":member",
  33. ":pattern",
  34. ":source_location",
  35. "//common:ostream",
  36. "//executable_semantics/common:nonnull",
  37. "@llvm-project//llvm:Support",
  38. ],
  39. )
  40. cc_library(
  41. name = "expression",
  42. srcs = ["expression.cpp"],
  43. hdrs = ["expression.h"],
  44. deps = [
  45. ":paren_contents",
  46. "//common:indirect_value",
  47. "//common:ostream",
  48. "//executable_semantics/common:arena",
  49. "//executable_semantics/common:error",
  50. "@llvm-project//llvm:Support",
  51. ],
  52. )
  53. cc_test(
  54. name = "expression_test",
  55. srcs = ["expression_test.cpp"],
  56. deps = [
  57. ":expression",
  58. ":paren_contents",
  59. "@llvm-project//llvm:gtest",
  60. "@llvm-project//llvm:gtest_main",
  61. ],
  62. )
  63. cc_library(
  64. name = "function_definition",
  65. srcs = ["function_definition.cpp"],
  66. hdrs = ["function_definition.h"],
  67. deps = [
  68. ":expression",
  69. ":source_location",
  70. ":statement",
  71. "@llvm-project//llvm:Support",
  72. ],
  73. )
  74. cc_library(
  75. name = "member",
  76. srcs = ["member.cpp"],
  77. hdrs = ["member.h"],
  78. deps = [
  79. ":pattern",
  80. ":source_location",
  81. "//common:ostream",
  82. ],
  83. )
  84. cc_library(
  85. name = "library_name",
  86. hdrs = ["library_name.h"],
  87. )
  88. cc_library(
  89. name = "paren_contents",
  90. hdrs = ["paren_contents.h"],
  91. deps = [
  92. ":source_location",
  93. "//executable_semantics/common:error",
  94. ],
  95. )
  96. cc_library(
  97. name = "pattern",
  98. srcs = ["pattern.cpp"],
  99. hdrs = ["pattern.h"],
  100. deps = [
  101. ":expression",
  102. ":source_location",
  103. "//common:ostream",
  104. "//executable_semantics/common:arena",
  105. "//executable_semantics/common:error",
  106. "@llvm-project//llvm:Support",
  107. ],
  108. )
  109. cc_test(
  110. name = "pattern_test",
  111. srcs = ["pattern_test.cpp"],
  112. deps = [
  113. ":paren_contents",
  114. ":pattern",
  115. "@llvm-project//llvm:Support",
  116. "@llvm-project//llvm:gtest",
  117. "@llvm-project//llvm:gtest_main",
  118. ],
  119. )
  120. cc_library(
  121. name = "source_location",
  122. hdrs = ["source_location.h"],
  123. deps = ["//common:ostream"],
  124. )
  125. cc_library(
  126. name = "statement",
  127. srcs = ["statement.cpp"],
  128. hdrs = ["statement.h"],
  129. deps = [
  130. ":expression",
  131. ":pattern",
  132. ":source_location",
  133. "//common:check",
  134. "//common:ostream",
  135. "//executable_semantics/common:arena",
  136. "@llvm-project//llvm:Support",
  137. ],
  138. )