BUILD 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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 = "class_definition",
  7. hdrs = ["class_definition.h"],
  8. deps = [
  9. ":member",
  10. ":source_location",
  11. "//common:ostream",
  12. "@llvm-project//llvm:Support",
  13. ],
  14. )
  15. cc_library(
  16. name = "declaration",
  17. srcs = ["declaration.cpp"],
  18. hdrs = [
  19. "abstract_syntax_tree.h",
  20. "declaration.h",
  21. ],
  22. deps = [
  23. ":class_definition",
  24. ":function_definition",
  25. ":member",
  26. ":pattern",
  27. ":source_location",
  28. "//common:ostream",
  29. "//executable_semantics/common:ptr",
  30. "@llvm-project//llvm:Support",
  31. ],
  32. )
  33. cc_library(
  34. name = "expression",
  35. srcs = ["expression.cpp"],
  36. hdrs = ["expression.h"],
  37. deps = [
  38. ":paren_contents",
  39. "//common:indirect_value",
  40. "//common:ostream",
  41. "//executable_semantics/common:arena",
  42. "//executable_semantics/common:error",
  43. "@llvm-project//llvm:Support",
  44. ],
  45. )
  46. cc_test(
  47. name = "expression_test",
  48. srcs = ["expression_test.cpp"],
  49. deps = [
  50. ":expression",
  51. ":paren_contents",
  52. "@llvm-project//llvm:gtest",
  53. "@llvm-project//llvm:gtest_main",
  54. ],
  55. )
  56. cc_library(
  57. name = "function_definition",
  58. srcs = ["function_definition.cpp"],
  59. hdrs = ["function_definition.h"],
  60. deps = [
  61. ":expression",
  62. ":source_location",
  63. ":statement",
  64. "@llvm-project//llvm:Support",
  65. ],
  66. )
  67. cc_library(
  68. name = "member",
  69. srcs = ["member.cpp"],
  70. hdrs = ["member.h"],
  71. deps = [
  72. ":pattern",
  73. ":source_location",
  74. "//common:ostream",
  75. ],
  76. )
  77. cc_library(
  78. name = "paren_contents",
  79. hdrs = ["paren_contents.h"],
  80. deps = [
  81. ":source_location",
  82. "//executable_semantics/common:error",
  83. ],
  84. )
  85. cc_library(
  86. name = "pattern",
  87. srcs = ["pattern.cpp"],
  88. hdrs = ["pattern.h"],
  89. deps = [
  90. ":expression",
  91. ":source_location",
  92. "//common:ostream",
  93. "//executable_semantics/common:arena",
  94. "//executable_semantics/common:error",
  95. "@llvm-project//llvm:Support",
  96. ],
  97. )
  98. cc_test(
  99. name = "pattern_test",
  100. srcs = ["pattern_test.cpp"],
  101. deps = [
  102. ":paren_contents",
  103. ":pattern",
  104. "@llvm-project//llvm:Support",
  105. "@llvm-project//llvm:gtest",
  106. "@llvm-project//llvm:gtest_main",
  107. ],
  108. )
  109. cc_library(
  110. name = "source_location",
  111. hdrs = ["source_location.h"],
  112. deps = ["//common:ostream"],
  113. )
  114. cc_library(
  115. name = "statement",
  116. srcs = ["statement.cpp"],
  117. hdrs = ["statement.h"],
  118. deps = [
  119. ":expression",
  120. ":pattern",
  121. ":source_location",
  122. "//common:check",
  123. "//common:ostream",
  124. "//executable_semantics/common:arena",
  125. "@llvm-project//llvm:Support",
  126. ],
  127. )