git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: sourav mondal <souravcristiano502@gmail.com>
To: git@vger.kernel.org
Cc: sourav mondal <souravcristiano502@gmail.com>
Subject: [PATCH v1] adding word_regex for go language
Date: Tue, 21 Mar 2017 01:05:55 +0530	[thread overview]
Message-ID: <20170320193555.6656-1-souravcristiano502@gmail.com> (raw)

Go programming language is one of the promissing language now. Adding built-in driver for the same. This patch contains word_regex for go. As the language specification this has alpha-numeric and under-score for identifiers. It covers all types of number system decimal, octal, hexadecimal. Also can specify signed or usigned number by using "u or U", long number by using "l or L" and exponent term by using "e or E". The following lines cover all types of operator ex. arithmatic, logical, bitwise, assignment etc.. 

Signed-off-by: sourav mondal <souravcristiano502@gmail.com>
---

I'm working on go language patterns and will send it soon.
thanks & regards 
sourav

 userdiff.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/userdiff.c b/userdiff.c
index 2f8e078..99f5539 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -148,6 +148,13 @@ PATTERNS("csharp",
 	 "[a-zA-Z_][a-zA-Z0-9_]*"
 	 "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?"
 	 "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"),
+PATTERNS("go",
+	  /* word_regex */
+	 "[a-zA-Z_][a-zA-Z0-9]*"/* identifiers */
+	 "|[0-9eE]+[lL]?[uU]?|0[xX]?[0-9a-fA-F]+[uU]?[lL]?" /* numbers */
+	 "|[-+*/%<>&|!^=]="/* operators */
+	 "|--|\\+\\+|&&|<<=|>>=|\\|\\|"
+),
 IPATTERN("css",
 	 "![:;][[:space:]]*$\n"
 	 "^[_a-z0-9].*$",
-- 
2.9.3


             reply	other threads:[~2017-03-20 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 19:35 sourav mondal [this message]
2017-03-20 20:39 ` [PATCH v1] adding word_regex for go language Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20170320193555.6656-1-souravcristiano502@gmail.com \
    --to=souravcristiano502@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).