summaryrefslogtreecommitdiff
path: root/userdiff.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2012-09-16 13:24:15 +0930
committerJunio C Hamano <gitster@pobox.com>2012-09-16 21:54:47 -0700
commite90d065e64702d09fbdfc7cfd1c97456c7faa74c (patch)
treedb1e8db896706a032115005362a6e7a1a342512a /userdiff.c
parent889d35899ba64640e47798681ecb34a4be043bad (diff)
downloadgit-e90d065e64702d09fbdfc7cfd1c97456c7faa74c.tar.gz
Add userdiff patterns for Ada
Add Ada xfuncname and wordRegex patterns to the list of builtin patterns. Signed-off-by: Adrian Johnson <ajohnson@redneon.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.c')
-rw-r--r--userdiff.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/userdiff.c b/userdiff.c
index 1e7184f7f0..ed958ef6b8 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -14,6 +14,15 @@ static int drivers_alloc;
{ name, NULL, -1, { pattern, REG_EXTENDED | REG_ICASE }, \
word_regex "|[^[:space:]]|[\xc0-\xff][\x80-\xbf]+" }
static struct userdiff_driver builtin_drivers[] = {
+IPATTERN("ada",
+ "!^(.*[ \t])?(is new|renames|is separate)([ \t].*)?$\n"
+ "!^[ \t]*with[ \t].*$\n"
+ "^[ \t]*((procedure|function)[ \t]+.*)$\n"
+ "^[ \t]*((package|protected|task)[ \t]+.*)$",
+ /* -- */
+ "[a-zA-Z][a-zA-Z0-9_]*"
+ "|[0-9][-+0-9#_.eE]"
+ "|=>|\\.\\.|\\*\\*|:=|/=|>=|<=|<<|>>|<>"),
IPATTERN("fortran",
"!^([C*]|[ \t]*!)\n"
"!^[ \t]*MODULE[ \t]+PROCEDURE[ \t]\n"