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 <hendeby@isy.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
bc1bbe0c19
commit
53b10a1405
@ -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"
|
||||
|
Reference in New Issue
Block a user