diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-04-21 03:23:34 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-21 03:23:34 +0300 |
commit | 6d7a62d74d4638f0e8ae026ad650269960201815 (patch) | |
tree | 96d47afa0c3ddf4fa94dfbc5bdcf37a242206ac5 /userdiff.c | |
parent | b0c09ab8796fb736efa432b8e817334f3e5ee75a (diff) | |
parent | a43739031092f951674d783ad3bdcbd603281851 (diff) |
Merge branch 'ar/userdiff-scheme'
Userdiff patterns for "Scheme" has been added.
* ar/userdiff-scheme:
userdiff: add support for Scheme
Diffstat (limited to 'userdiff.c')
-rw-r--r-- | userdiff.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/userdiff.c b/userdiff.c index 3f81a2261c..3897317aff 100644 --- a/userdiff.c +++ b/userdiff.c @@ -191,6 +191,15 @@ PATTERNS("rust", "[a-zA-Z_][a-zA-Z0-9_]*" "|[0-9][0-9_a-fA-Fiosuxz]*(\\.([0-9]*[eE][+-]?)?[0-9_fF]*)?" "|[-+*\\/<>%&^|=!:]=|<<=?|>>=?|&&|\\|\\||->|=>|\\.{2}=|\\.{3}|::"), +PATTERNS("scheme", + "^[\t ]*(\\(((define|def(struct|syntax|class|method|rules|record|proto|alias)?)[-*/ \t]|(library|module|struct|class)[*+ \t]).*)$", + /* + * R7RS valid identifiers include any sequence enclosed + * within vertical lines having no backslashes + */ + "\\|([^\\\\]*)\\|" + /* All other words should be delimited by spaces or parentheses */ + "|([^][)(}{[ \t])+"), PATTERNS("bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$", "[={}\"]|[^={}\" \t]+"), PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$", |