cc_library(
    name = "ast",
    srcs = glob(
        [
            "*.cc",
            "*.h",
        ],
        exclude = [
            "*_test.cc",

            # workaround https://github.com/flycheck/flycheck/issues/248 in emacs
            "flycheck_*",
        ],
    ),
    hdrs = [
        "ParamParsing.h",
        "ast.h",
    ],
    linkstatic = select({
        "//tools/config:linkshared": 0,
        "//conditions:default": 1,
    }),
    visibility = ["//visibility:public"],
    deps = [
        "//common",
        "//core",
        "//core/hashing",
    ],
)

cc_test(
    name = "tree_test",
    srcs = [
        "test/tree_test.cc",
    ],
    visibility = ["//visibility:public"],
    deps = [
        "//ast",
        "@doctest//doctest",
        "@doctest//doctest:main",
    ],
)
