{"thread":{"id":"45443","subject":"[PATCH v1] adding word_regex for go language","startedAt":"2017-03-20T19:36:25Z","lastAt":"2017-03-20T20:39:18Z","messageCount":2,"participants":["sourav mondal","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"314715","messageId":"20170320193555.6656-1-souravcristiano502@gmail.com","threadId":"45443","inReplyTo":null,"subject":"[PATCH v1] adding word_regex for go language","fromName":"sourav mondal","fromEmail":"souravcristiano502@gmail.com","sentAt":"2017-03-20T19:35:55Z","receivedAt":"2017-03-20T19:36:25Z","isPatch":true,"sender":{"key":"souravcristiano502@gmail.com","avatar":null},"body":"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.. \n\nSigned-off-by: sourav mondal <souravcristiano502@gmail.com>\n---\n\nI'm working on go language patterns and will send it soon.\nthanks & regards \nsourav\n\n userdiff.c | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/userdiff.c b/userdiff.c\nindex 2f8e078..99f5539 100644\n--- a/userdiff.c\n+++ b/userdiff.c\n@@ -148,6 +148,13 @@ PATTERNS(\"csharp\",\n \t \"[a-zA-Z_][a-zA-Z0-9_]*\"\n \t \"|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?\"\n \t \"|[-+*/<>%&^|=!]=|--|\\\\+\\\\+|<<=?|>>=?|&&|\\\\|\\\\||::|->\"),\n+PATTERNS(\"go\",\n+\t  /* word_regex */\n+\t \"[a-zA-Z_][a-zA-Z0-9]*\"/* identifiers */\n+\t \"|[0-9eE]+[lL]?[uU]?|0[xX]?[0-9a-fA-F]+[uU]?[lL]?\" /* numbers */\n+\t \"|[-+*/%<>&|!^=]=\"/* operators */\n+\t \"|--|\\\\+\\\\+|&&|<<=|>>=|\\\\|\\\\|\"\n+),\n IPATTERN(\"css\",\n \t \"![:;][[:space:]]*$\\n\"\n \t \"^[_a-z0-9].*$\",\n-- \n2.9.3\n\n"},{"id":"314726","messageId":"xmqqk27jvg28.fsf@gitster.mtv.corp.google.com","threadId":"45443","inReplyTo":"20170320193555.6656-1-souravcristiano502@gmail.com","subject":"Re: [PATCH v1] adding word_regex for go language","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-03-20T20:39:11Z","receivedAt":"2017-03-20T20:39:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"sourav mondal <souravcristiano502@gmail.com> writes:\n\n> Subject: Re: [PATCH v1] adding word_regex for go language\n\nPerhaps clarify the title with what area this change affects, e.g.\n\n\tSubject: userdiff.c: patterns for \"go\" language\n\ncf. Documentation/SubmittingPatches.\n\n> 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.. \n\nWrap long lines.  Also unless there is a good reason not to, we tend\nto write our log messsage in imperative mood, as if you are giving\norders to the codebase to \"be like so\", or giving orders to a patch\nmonkey to \"make the code like so\".\n\n>\n> Signed-off-by: sourav mondal <souravcristiano502@gmail.com>\n> ---\n>\n> I'm working on go language patterns and will send it soon.\n> thanks & regards \n> sourav\n>\n>  userdiff.c | 7 +++++++\n>  1 file changed, 7 insertions(+)\n>\n> diff --git a/userdiff.c b/userdiff.c\n> index 2f8e078..99f5539 100644\n> --- a/userdiff.c\n> +++ b/userdiff.c\n> @@ -148,6 +148,13 @@ PATTERNS(\"csharp\",\n>  \t \"[a-zA-Z_][a-zA-Z0-9_]*\"\n>  \t \"|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?\"\n>  \t \"|[-+*/<>%&^|=!]=|--|\\\\+\\\\+|<<=?|>>=?|&&|\\\\|\\\\||::|->\"),\n> +PATTERNS(\"go\",\n> +\t  /* word_regex */\n> +\t \"[a-zA-Z_][a-zA-Z0-9]*\"/* identifiers */\n> +\t \"|[0-9eE]+[lL]?[uU]?|0[xX]?[0-9a-fA-F]+[uU]?[lL]?\" /* numbers */\n> +\t \"|[-+*/%<>&|!^=]=\"/* operators */\n> +\t \"|--|\\\\+\\\\+|&&|<<=|>>=|\\\\|\\\\|\"\n> +),\n\nPATTERNS() takes three arguments, the name of the pattern, pattern\nand word_regex.\n\nPlease do not send an incomplete patch that does not even compile\nwithout marking as such (i.e. request for help or early comments\nfrom those who are willing to help even on an incomplete work).\n\nThanks.\n\n"}]}