summary refs log tree commit diff
path: root/bin/hi.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-02-18 21:07:46 -0500
committerJune McEnroe <june@causal.agency>2019-02-18 21:07:46 -0500
commitfc881d11da66055e6955e1c861f0a838d5586e81 (patch)
treeb63af4851fa4995ce10b467038adf2edecc3c3e8 /bin/hi.c
parentMatch whitespace between * [] {} (diff)
downloadsrc-fc881d11da66055e6955e1c861f0a838d5586e81.tar.gz
src-fc881d11da66055e6955e1c861f0a838d5586e81.zip
Don't match nested parentheses in Tag for C
Fixes mistaken highlight of:

    pngWrite(file, (uint8_t []) { 0, 0, 0 }, 3);
Diffstat (limited to 'bin/hi.c')
-rw-r--r--bin/hi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/hi.c b/bin/hi.c
index 1daf56c4..c55d617c 100644
--- a/bin/hi.c
+++ b/bin/hi.c
@@ -94,7 +94,7 @@ static const struct Syntax CSyntax[] = {
 	{ Tag, .subexp = 2,
 		.pattern = "(enum|struct|union)" SP1 "(" PATTERN_ID ")" SP0 "[{]" },
 	{ Tag, .parent = ~SET(Keyword), .newline = true, .subexp = 1,
-		.pattern = "(" PATTERN_ID ")" SP0 "[(][^)]*[)]" SP0 "[{]" },
+		.pattern = "(" PATTERN_ID ")" SP0 "[(][^()]*[)]" SP0 "[{]" },
 	{ Tag, .newline = true, .subexp = 3, .pattern =
 		"(static|typedef)" SP1
 		"(" "(" PATTERN_ID ")" SP0