From: sourav mondal <souravcristiano502@gmail.com>
To: git@vger.kernel.org
Cc: sourav mondal <souravcristiano502@gmail.com>
Subject: [Gsoc] adding built-in driver for javascript
Date: Sat, 11 Mar 2017 14:53:38 +0530 [thread overview]
Message-ID: <20170311092338.9809-1-souravcristiano502@gmail.com> (raw)
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
next reply other threads:[~2017-03-11 9:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 9:23 sourav mondal [this message]
2017-03-11 11:04 ` [Gsoc] adding built-in driver for javascript Christian Couder
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=20170311092338.9809-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.
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).