summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-19 02:34:08 -0500
committerJune McEnroe <june@causal.agency>2019-12-19 02:34:08 -0500
commit9de0fd86e861c2b3a06a0d9ac7063a428d8a691c (patch)
treebe1040795183124e0f1954b44cbd6ab1877455cd
parentAvoid matching := assignments as tags (diff)
downloadsrc-9de0fd86e861c2b3a06a0d9ac7063a428d8a691c.tar.gz
src-9de0fd86e861c2b3a06a0d9ac7063a428d8a691c.zip
Fix matching make tags with no sources
Diffstat (limited to '')
-rw-r--r--bin/hi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/hi.c b/bin/hi.c
index b05110bd..3af6766f 100644
--- a/bin/hi.c
+++ b/bin/hi.c
@@ -142,8 +142,8 @@ static const struct Syntax MakeSyntax[] = {
 		.pattern = WB "([.](PHONY|PRECIOUS|SUFFIXES))" WB },
 	{ Macro,
 		.pattern = "^ *-?include" },
-	{ Tag, .parent = ~SET(Keyword), .subexp = 1,
-		.pattern = "(" MAKE_TARGET ")" "(" BL1 MAKE_TARGET ")*" BL0 ":[^=]" },
+	{ Tag, .parent = ~SET(Keyword), .subexp = 1, .pattern =
+		"(" MAKE_TARGET ")" "(" BL1 MAKE_TARGET ")*" BL0 ":([^=]|$)" },
 	{ String, .subexp = 1,
 		.pattern = "[._[:alnum:]]+" BL0 "[!+:?]?=" BL0 "(.*)" },
 	{ Normal,