git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sup Yut Sum <ch3cooli@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Sup Yut Sum <ch3cooli@gmail.com>
Subject: [PATCH 1/2] userdiff: support C# async methods and correct C# keywords
Date: Mon,  2 Jun 2014 12:13:24 +0800	[thread overview]
Message-ID: <1401682405-3319-1-git-send-email-ch3cooli@gmail.com> (raw)

async is in C# 5.0
foreach is in C# 1.0
instanceof is in Java. The similar keywords are typeof, is, as in C# 1.0
default, try are in C# 1.0

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
---
 userdiff.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/userdiff.c b/userdiff.c
index fad52d6..96eda6c 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -134,9 +134,9 @@ PATTERNS("cpp",
 	 "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*"),
 PATTERNS("csharp",
 	 /* Keywords */
-	 "!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n"
+	 "!^[ \t]*(do|while|for|foreach|if|else|typeof|is|as|new|return|switch|case|default|throw|try|catch|using)\n"
 	 /* Methods and constructors */
-	 "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe)[ \t]+)*[][<>@.~_[:alnum:]]+[ \t]+[<>@._[:alnum:]]+[ \t]*\\(.*\\))[ \t]*$\n"
+	 "^[ \t]*(((static|public|internal|private|protected|new|virtual|sealed|override|unsafe|async)[ \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.9.1

             reply	other threads:[~2014-06-02  4:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02  4:13 Sup Yut Sum [this message]
2014-06-02  4:13 ` [PATCH 2/2] userdiff: support Java try keyword Sup Yut Sum
2014-06-02 19:25   ` Junio C Hamano
2014-06-05 22:59 ` [PATCH 1/2] userdiff: support C# async methods and correct C# keywords Junio C Hamano
2014-06-06 13:27   ` Steve Hoelzer
2014-06-06 17:34     ` Junio C Hamano
2014-06-07 16:00       ` Steve Hoelzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401682405-3319-1-git-send-email-ch3cooli@gmail.com \
    --to=ch3cooli@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).