1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 00:42:33 +03:00

Cleanup this rule.

This commit is contained in:
Patrick Thomson 2020-06-26 14:14:21 -04:00
parent 8079870734
commit a3f3022262

View File

@ -32,16 +32,14 @@ STANDARD_EXECUTABLE_FLAGS = [
] ]
def tree_sitter_node_types_archive(name, version, sha256, urls = [], nodetypespath = "src/node-types.json"): def tree_sitter_node_types_archive(name, version, sha256, urls = [], nodetypespath = "src/node-types.json"):
if urls == []: """Create a target for a tree-sitter grammar and export its node-types.json file."""
urls = ["https://github.com/tree-sitter/{}/archive/v{}.tar.gz".format(name, version)]
http_archive( http_archive(
name = name, name = name,
build_file_content = """ build_file_content = """
exports_files(glob(["{}"])) exports_files(glob(["{}"]))
""".format(nodetypespath), """.format(nodetypespath),
strip_prefix = "{}-{}".format(name, version), strip_prefix = "{}-{}".format(name, version),
urls = urls, urls = ["https://github.com/tree-sitter/{}/archive/v{}.tar.gz".format(name, version)],
sha256 = sha256, sha256 = sha256,
) )