blob: 3ec96760e89d7826da87d8136e62e873afb99a5a [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
filegroup(
name = "common_libs",
srcs = [
"alloc.h",
"api.h",
"array.h",
],
visibility = [":__subpackages__"],
)
go_library(
name = "go-tree-sitter",
srcs = [
"alloc.c",
"alloc.h",
"api.h",
"array.h",
"atomic.h",
"bindings.c",
"bindings.go",
"bindings.h",
"bits.h",
"clock.h",
"error_costs.h",
"get_changed_ranges.c",
"get_changed_ranges.h",
"host.h",
"iter.go",
"language.c",
"language.h",
"length.h",
"lexer.c",
"lexer.h",
"node.c",
"parser.c",
"parser.h",
"point.h",
"ptypes.h",
"query.c",
"reduce_action.h",
"reusable_node.h",
"stack.c",
"stack.h",
"subtree.c",
"subtree.h",
"test_grammar.go",
"tree.c",
"tree.h",
"tree_cursor.c",
"tree_cursor.h",
"umachine.h",
"unicode.h",
"urename.h",
"utf.h",
"utf16.h",
"utf8.h",
"wasm_store.c",
"wasm_store.h",
],
cgo = True,
importpath = "github.com/smacker/go-tree-sitter",
visibility = ["//visibility:public"],
)
go_library(
name = "python",
srcs = [
"python/binding.go",
"python/parser.c",
"python/parser.h",
"python/scanner.c",
":common_libs",
],
cgo = True,
importpath = "github.com/smacker/go-tree-sitter/python",
visibility = ["//visibility:public"],
deps = [":go-tree-sitter"],
)