userdiff: support unsigned and long long suffixes of integer constants
authorJohannes Sixt <j6t@kdbg.org>
Fri, 21 Mar 2014 21:07:14 +0000 (22:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Mar 2014 21:48:07 +0000 (14:48 -0700)
Do not split constants such as 123U, 456ll, 789UL at the first U or
second L.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
userdiff.c
index 434535bd63485bc83619b4580dc86a2cd407e26d..8830417e3be09ea47453bfc1a7567d3028f274f9 100644 (file)
@@ -132,7 +132,7 @@ PATTERNS("cpp",
         "^((struct|class|enum)[^;]*)$",
         /* -- */
         "[a-zA-Z_][a-zA-Z0-9_]*"
-        "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?"
+        "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lLuU]*"
         "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*"),
 PATTERNS("csharp",
         /* Keywords */