BUILD 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. ],
  30. )
  31. cc_library(
  32. name = "function_definition",
  33. srcs = ["function_definition.cpp"],
  34. hdrs = ["function_definition.h"],
  35. deps = [
  36. ":expression",
  37. ":statement",
  38. ],
  39. )
  40. cc_library(
  41. name = "member",
  42. srcs = ["member.cpp"],
  43. hdrs = ["member.h"],
  44. deps = [
  45. ":expression",
  46. "//common:ostream",
  47. ],
  48. )
  49. cc_library(
  50. name = "statement",
  51. srcs = ["statement.cpp"],
  52. hdrs = ["statement.h"],
  53. deps = [
  54. ":expression",
  55. "//common:check",
  56. "//common:ostream",
  57. ],
  58. )
  59. cc_library(
  60. name = "struct_definition",
  61. hdrs = ["struct_definition.h"],
  62. deps = [
  63. ":member",
  64. "//common:ostream",
  65. ],
  66. )