load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(
    licenses = ["notice"],  # Apache 2.0
)

go_library(
    name = "go_default_library",
    srcs = [
        "errors.go",
        "helper.go",
        "macro.go",
        "parser.go",
        "unescape.go",
        "unparser.go",
    ],
    importpath = "github.com/google/cel-go/parser",
    deps = [
        "//common:go_default_library",
        "//common/operators:go_default_library",
        "//parser/gen:go_default_library",
        "@com_github_antlr//runtime/Go/antlr:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@org_golang_google_genproto//googleapis/api/expr/v1alpha1:go_default_library",
        "@io_bazel_rules_go//proto/wkt:struct_go_proto",
    ],
    visibility = ["//visibility:public"],
)


go_test(
    name = "go_default_test",
    size = "small",
    srcs = [
        "parser_test.go",
        "unescape_test.go",
        "unparser_test.go",
    ],
    embed = [
        ":go_default_library",
    ],
    deps = [
        "//common/debug:go_default_library",
        "//parser/gen:go_default_library",
        "//test:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@com_github_antlr//runtime/Go/antlr:go_default_library",
    ],
)
