Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonrad Borowski <konrad@borowski.pw>2020-10-07 16:26:11 +0300
committerJunio C Hamano <gitster@pobox.com>2020-10-07 18:48:20 +0300
commita04c7e0f1b6680385945ea901283d6335c4c108a (patch)
treeb5f43c57b17f403c8b0cd348e0cabc02a80c8f29 /userdiff.c
parentd98273ba77e1ab9ec755576bc86c716a97bf59d7 (diff)
userdiff: recognize 'macro_rules!' as starting a Rust function block
Signed-off-by: Konrad Borowski <konrad@borowski.pw> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.c')
-rw-r--r--userdiff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c
index fde02f225b..2903037724 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -165,7 +165,7 @@ PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$",
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?."
"|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"),
PATTERNS("rust",
- "^[\t ]*((pub(\\([^\\)]+\\))?[\t ]+)?((async|const|unsafe|extern([\t ]+\"[^\"]+\"))[\t ]+)?(struct|enum|union|mod|trait|fn|impl)[< \t]+[^;]*)$",
+ "^[\t ]*((pub(\\([^\\)]+\\))?[\t ]+)?((async|const|unsafe|extern([\t ]+\"[^\"]+\"))[\t ]+)?(struct|enum|union|mod|trait|fn|impl|macro_rules!)[< \t]+[^;]*)$",
/* -- */
"[a-zA-Z_][a-zA-Z0-9_]*"
"|[0-9][0-9_a-fA-Fiosuxz]*(\\.([0-9]*[eE][+-]?)?[0-9_fF]*)?"