]> git.ipfire.org Git - thirdparty/git.git/blobdiff - userdiff.c
test-ref-store: remove force-create argument for create-reflog
[thirdparty/git.git] / userdiff.c
index af02b1878c7d0128a2b650d03c050168e9ac7a3e..8578cb0d12e59848ebd3d4bff754ada89ec99656 100644 (file)
@@ -64,9 +64,15 @@ PATTERNS("cpp",
         /* functions/methods, variables, and compounds at top level */
         "^((::[[:space:]]*)?[A-Za-z_].*)$",
         /* -- */
+        /* identifiers and keywords */
         "[a-zA-Z_][a-zA-Z0-9_]*"
-        "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lLuU]*"
-        "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*"),
+        /* decimal and octal integers as well as floatingpoint numbers */
+        "|[0-9][0-9.]*([Ee][-+]?[0-9]+)?[fFlLuU]*"
+        /* hexadecimal and binary integers */
+        "|0[xXbB][0-9a-fA-F]+[lLuU]*"
+        /* floatingpoint numbers that begin with a decimal point */
+        "|\\.[0-9][0-9]*([Ee][-+]?[0-9]+)?[fFlL]?"
+        "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*|<=>"),
 PATTERNS("csharp",
         /* Keywords */
         "!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n"