From 53b10a140527253f61cfc209a4e85e132c0bc4ee Mon Sep 17 00:00:00 2001 From: Gustaf Hendeby Date: Tue, 15 Nov 2011 21:15:03 +0100 Subject: Add built-in diff patterns for MATLAB code MATLAB is often used in industry and academia for scientific computations motivating it being included as a built-in pattern. Signed-off-by: Gustaf Hendeby Signed-off-by: Junio C Hamano --- userdiff.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'userdiff.c') diff --git a/userdiff.c b/userdiff.c index bf553ad91..7c983c14f 100644 --- a/userdiff.c +++ b/userdiff.c @@ -37,6 +37,9 @@ PATTERNS("java", "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?" "|[-+*/<>%&^|=!]=" "|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"), +PATTERNS("matlab", + "^[[:space:]]*((classdef|function)[[:space:]].*)$|^%%[[:space:]].*$", + "[a-zA-Z_][a-zA-Z0-9_]*|[-+0-9.e]+|[=~<>]=|\\.[*/\\^']|\\|\\||&&"), PATTERNS("objc", /* Negate C statements that can look like functions */ "!^[ \t]*(do|for|if|else|return|switch|while)\n" -- cgit v1.2.1