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

genrule(
    name = "dumpstdlibast",
    srcs = ["@cpp_jsonnet//stdlib"],
    outs = ["stdast.go"],
    cmd = "./$(location //cmd/dumpstdlibast) \"$<\" > \"$@\"",
    tools = ["//cmd/dumpstdlibast"],
)

go_library(
    name = "astgen",
    srcs = ["stdast.go"],
    importpath = "github.com/google/go-jsonnet/astgen",
    visibility = ["//:__subpackages__"],
    deps = ["//ast"],
)
