From: Tor Arvid Lund Date: Fri, 22 Oct 2010 16:31:43 GMT Subject: [PATCH] userdiff.c: Improve builtin csharp regex patterns. Message-ID: <1287765103-3778-1-git-send-email-torarvid@gmail.com> This fixes the case where you have a c# method on the form: public Dictionary GetSomeMap() The previous regex did not support generic syntax with more than one type parameter. This patch basically copies the regex used for methods, and adds the requirement that it has a MethodName<.*> pattern where the .* can contain Comma, Space and Tab. Signed-off-by: Tor Arvid Lund --- Maybe someone can optimize this, or merge it with the "Methods and constructors" pattern in a nice way. It seemed to solve my itch, at least... userdiff.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/userdiff.c b/userdiff.c index f9e05b5..06d8077 100644 --- a/userdiff.c +++ b/userdiff.c @@ -103,6 +103,8 @@ PATTERNS("csharp", "!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n" /* Methods and constructors */ "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[<>@._[:alnum:]]+[ \t]*\\(.*\\))[ \t]*$\n" + /* Generic methods */ + "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][@._[:alnum:]]+<[<>@., \t[:alnum:]]+>[ \t]+[@._[:alnum:]]+(<[<>@., \t[:alnum:]]+>)?[ \t]*\\(.*\\))[ \t]*$\n" /* Properties */ "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[@._[:alnum:]]+)[ \t]*$\n" /* Type definitions */ -- 1.7.3.GIT