cc_library(
    name = "rewriter",
    srcs = glob(
        [
            "*.cc",
            "*.h",
        ],
        # workaround https://github.com/flycheck/flycheck/issues/248 in emacs
        exclude = ["flycheck_*"],
    ),
    hdrs = ["rewriter.h"],
    linkstatic = select({
        "//tools/config:linkshared": 0,
        "//conditions:default": 1,
    }),
    visibility = ["//visibility:public"],
    deps = [
        "//ast",
        "//ast/packager",
        "//ast/treemap",
        "//ast/verifier",
        "//common",
        "//core",
        "//rewriter/util",
    ],
)
