* [Gsoc] adding built-in driver for javascript
@ 2017-03-11 9:23 sourav mondal
2017-03-11 11:04 ` Christian Couder
0 siblings, 1 reply; 2+ messages in thread
From: sourav mondal @ 2017-03-11 9:23 UTC (permalink / raw)
To: git; +Cc: sourav mondal
I'm working on "Add more builtin pattern for userdiff" as my microproject for Gsoc17.As I noticed javascript's builtin driver was not present in userdiff of git/git tree. Hopefully this pattern will cover all cases. I'm really eager to know about my work and wiiling to add more pattern for well known lanaguage.
thanks & regards,
sourav
Signed-off-by: sourav mondal <souravcristiano502@gmail.com>
---
userdiff.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/userdiff.c b/userdiff.c
index 8b732e4..2f8e078 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -160,6 +160,16 @@ IPATTERN("css",
"-?[_a-zA-Z][-_a-zA-Z0-9]*" /* identifiers */
"|-?[0-9]+|\\#[0-9a-fA-F]+" /* numbers */
),
+PATTERNS("javascript",
+ /* keywords/patterns*/
+ "^[ \t]*(var|if|else|for|do|while|switch|case|function|break|continue|new|return|class|super|instanceof)"
+ "^[ \t]*(([a-zA-Z_][a-zA-Z0-9])*[ \t]*\\.?[a-zA-Z_]*\\(\\)[ \t]*);$",
+ /* word_regex */
+ "[a-zA-Z_][a-zA-Z0-9]*"
+ "|[-+0-9.eE]+|0[bB]?|[xX]?|o?[0-9a-fA-F]+"
+ "|[==-+*/%<>&|!**=^]="
+ "|--|\\+\\+|<<=?|>>>?=?|&&|\|\|"
+),
{ "default", NULL, -1, { NULL, 0 } },
};
#undef PATTERNS
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Gsoc] adding built-in driver for javascript
2017-03-11 9:23 [Gsoc] adding built-in driver for javascript sourav mondal
@ 2017-03-11 11:04 ` Christian Couder
0 siblings, 0 replies; 2+ messages in thread
From: Christian Couder @ 2017-03-11 11:04 UTC (permalink / raw)
To: sourav mondal; +Cc: git
On Sat, Mar 11, 2017 at 10:23 AM, sourav mondal
<souravcristiano502@gmail.com> wrote:
> I'm working on "Add more builtin pattern for userdiff" as my microproject for Gsoc17.As I noticed javascript's builtin driver was not present in userdiff of git/git tree. Hopefully this pattern will cover all cases. I'm really eager to know about my work and wiiling to add more pattern for well known lanaguage.
If this is a patch that you are submitting, please:
- add "[PATCH]" to the subject of your email, and if it's not the
first time it is sent, add v2, v3 or so after "PATCH"
- move the information related to your GSoC (and the "thanks &
regards" part) just after your "Signed-off-by" and the "---" line
below it, as it should not appear in the commit message after your
patch is applied (you can check that using `git format-patch` and `git
am`)
- write a better description of your patch above after the GSoC
related information has been moved (`git log userdiff.c` can help you
see how others have done it)
Thanks.
> thanks & regards,
> sourav
>
> Signed-off-by: sourav mondal <souravcristiano502@gmail.com>
> ---
> userdiff.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-11 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11 9:23 [Gsoc] adding built-in driver for javascript sourav mondal
2017-03-11 11:04 ` Christian Couder
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).