diff options
author | Justin Spahr-Summers <justin.spahrsummers@gmail.com> | 2014-04-11 12:03:28 -0700 |
---|---|---|
committer | Justin Spahr-Summers <justin.spahrsummers@gmail.com> | 2014-04-11 12:03:28 -0700 |
commit | 054a7959e372c99be55748f76fe541f1c0a537ca (patch) | |
tree | dd78ed8ab8344d03463ea1edd6e1d80a170724d8 /src/userdiff.h | |
parent | 8f7bc6461b81499216b73881b07f5476c5085660 (diff) | |
parent | bcc622934a90307390f058c7ef4203f8bbcfe0d6 (diff) | |
download | libgit2-jss/fix-ignore-pop.tar.gz |
Merge remote-tracking branch 'origin/development' into jss/fix-ignore-popjss/fix-ignore-pop
Diffstat (limited to 'src/userdiff.h')
-rw-r--r-- | src/userdiff.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/userdiff.h b/src/userdiff.h index 7eb095246..523f2f8d4 100644 --- a/src/userdiff.h +++ b/src/userdiff.h @@ -45,13 +45,13 @@ typedef struct { static git_diff_driver_definition builtin_defs[] = { IPATTERN("ada", - "!^(.*[ \t])?(is new|renames|is separate)([ \t].*)?$\n" + "!^(.*[ \t])?(is[ \t]+new|renames|is[ \t]+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]" + "|[-+]?[0-9][0-9#_.aAbBcCdDeEfF]*([eE][+-]?[0-9_]+)?" "|=>|\\.\\.|\\*\\*|:=|/=|>=|<=|<<|>>|<>"), IPATTERN("fortran", @@ -159,15 +159,13 @@ PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$", PATTERNS("cpp", /* Jump targets or access declarations */ - "!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:.*$\n" - /* C/++ functions/methods at top level */ - "^([A-Za-z_][A-Za-z_0-9]*([ \t*]+[A-Za-z_][A-Za-z_0-9]*([ \t]*::[ \t]*[^[:space:]]+)?){1,}[ \t]*\\([^;]*)$\n" - /* compound type at top level */ - "^((struct|class|enum)[^;]*)$", + "!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:[[:space:]]*($|/[/*])\n" + /* functions/methods, variables, and compounds at top level */ + "^((::[[:space:]]*)?[A-Za-z_].*)$", /* -- */ "[a-zA-Z_][a-zA-Z0-9_]*" - "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?" - "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"), + "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lLuU]*" + "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*"), PATTERNS("csharp", /* Keywords */ |