git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] userdiff: support C# async methods and correct C# keywords

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 5, 2014, 22:59 UTC
Message-ID
<xmqqy4xbq7xo.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1401682405-3319-1-git-send-email-ch3cooli@gmail.com>
Sup Yut Sum <ch3cooli@gmail.com> writes:
> 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
This one made me read it twice, until I realized you meant
    instanceof() is listed as keywords, but there is no such thing
    (it is in Java, though); in C# we use typeof() for similar
    purposes
Show 23 quoted lines
> 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 */
Previous: Junio C HamanoNext: Steve Hoelzer
Message 4 of 7 in “userdiff: support C# async methods and correct C# keywords”
  1. 1/2 userdiff: support C# async methods and correct C# keywordsSup Yut Sum, Jun 2, 2014
  2. 2/2 userdiff: support Java try keywordSup Yut Sum, Jun 2, 2014
  3. Junio C HamanoJun 2, 2014
  4. Junio C HamanoJun 5, 2014
  5. Steve HoelzerJun 6, 2014
  6. Junio C HamanoJun 6, 2014
  7. Steve HoelzerJun 7, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.