BUILD 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. load("@rules_cc//cc:defs.bzl", "cc_library")
  5. package(default_visibility = ["//executable_semantics:__subpackages__"])
  6. cc_library(
  7. name = "declaration",
  8. srcs = ["declaration.cpp"],
  9. hdrs = [
  10. "abstract_syntax_tree.h",
  11. "declaration.h",
  12. ],
  13. deps = [
  14. ":function_definition",
  15. ":member",
  16. ":struct_definition",
  17. "//common:ostream",
  18. "//executable_semantics/interpreter:address",
  19. "//executable_semantics/interpreter:containers",
  20. ],
  21. )
  22. cc_library(
  23. name = "expression",
  24. srcs = ["expression.cpp"],
  25. hdrs = ["expression.h"],
  26. deps = [
  27. "//common:indirect_value",
  28. "//common:ostream",
  29. "//executable_semantics/common:error",
  30. ],
  31. )
  32. cc_library(
  33. name = "function_definition",
  34. srcs = ["function_definition.cpp"],
  35. hdrs = ["function_definition.h"],
  36. deps = [
  37. ":expression",
  38. ":statement",
  39. ],
  40. )
  41. cc_library(
  42. name = "member",
  43. srcs = ["member.cpp"],
  44. hdrs = ["member.h"],
  45. deps = [
  46. ":expression",
  47. "//common:ostream",
  48. ],
  49. )
  50. cc_library(
  51. name = "statement",
  52. srcs = ["statement.cpp"],
  53. hdrs = ["statement.h"],
  54. deps = [
  55. ":expression",
  56. "//common:check",
  57. "//common:ostream",
  58. ],
  59. )
  60. cc_library(
  61. name = "struct_definition",
  62. hdrs = ["struct_definition.h"],
  63. deps = [
  64. ":member",
  65. "//common:ostream",
  66. ],
  67. )