We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3953cb2 commit 5580bc7Copy full SHA for 5580bc7
1 file changed
bazel/antlr.bzl
@@ -51,7 +51,9 @@ def _antlr_library(ctx):
51
antlr_args.add("-package", ctx.attr.package)
52
antlr_args.add(ctx.file.src)
53
54
+ # Strip ".g4" extension.
55
basename = ctx.file.src.basename[:-3]
56
+
57
suffixes = ["Lexer", "Parser", "BaseVisitor", "Visitor"]
58
59
ctx.actions.run(
@@ -66,7 +68,7 @@ def _antlr_library(ctx):
66
68
for suffix in suffixes:
67
69
header = ctx.actions.declare_file(basename + suffix + ".h")
70
source = ctx.actions.declare_file(basename + suffix + ".cpp")
- generated = output.path + "/" + ctx.file.src.short_path[:-3] + suffix
71
+ generated = output.path + "/" + ctx.file.src.path[:-3] + suffix
72
73
ctx.actions.run_shell(
74
mnemonic = "CopyHeader" + suffix,
0 commit comments