summary refs log tree commit diff
path: root/bin/hi.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-02-18 18:00:20 -0500
committerJune McEnroe <june@causal.agency>2019-02-18 18:00:20 -0500
commit73590ef5aef53bcb6cac0583363ddd1fdbe3b28c (patch)
tree09fd4a8ca7f59b5875bb307ebaf5d2dad750a8ba /bin/hi.c
parentClean up htmlHeader (diff)
downloadsrc-73590ef5aef53bcb6cac0583363ddd1fdbe3b28c.tar.gz
src-73590ef5aef53bcb6cac0583363ddd1fdbe3b28c.zip
Match statics and typedefs as Tag
Diffstat (limited to 'bin/hi.c')
-rw-r--r--bin/hi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/hi.c b/bin/hi.c
index a96ab902..1eff50bd 100644
--- a/bin/hi.c
+++ b/bin/hi.c
@@ -93,8 +93,11 @@ static const struct Syntax CSyntax[] = {
 		.pattern = "define" BL1 "(" PATTERN_ID ")" BL0 "[(]" },
 	{ Tag, .subexp = 2,
 		.pattern = "(enum|struct|union)" SP1 "(" PATTERN_ID ")" SP0 "[{]" },
-	{ Tag, .parent = ~SET(Keyword), .subexp = 1,
+	{ Tag, .parent = ~SET(Keyword), .newline = true, .subexp = 1,
 		.pattern = "(" PATTERN_ID ")" SP0 "[(][^)]*[)]" SP0 "[{]" },
+	{ Tag, .newline = true, .subexp = 3, .pattern =
+		"(static|typedef)" SP1
+		"(" "(" PATTERN_ID ")" SP0 "([*]|[[][^]]*[]]|[{][^}]*[}])*" SP0 ")+" },
 	{ String, .parent = SET(Macro), .subexp = 1,
 		.pattern = "include" BL0 "(<[^>]*>)" },
 	{ String,