More robust heuristics for .m files and 3 new Matlab tests. Support for Obj-C detection fully intact; all tests pass. Detection of Obj-C keywords @implementation, @property, @interface, and @synthesize removed to avoid possible conflicts with user-created Matlab function handles. Only @end is needed, which is not valid in Matlab. Matlab class files supported. Comments preceded by whitespace detected for Obj-C and Matlab.

Signed-off-by: Andrew D. Horchler <adh9@case.edu>
This commit is contained in:
Andrew D. Horchler
2012-05-08 18:29:34 -04:00
parent f0eace7f86
commit 354e1fc85e
5 changed files with 90 additions and 10 deletions

29
test/fixtures/matlab_class.m vendored Normal file
View File

@@ -0,0 +1,29 @@
classdef matlab_class
properties
R;
G;
B;
end
methods
function obj = matlab_class(r,g,b)
obj.R = r;
obj.G = g;
obj.B = b;
end
function disp(obj)
disp(['Red: ' num2str(obj.R) ...
', Green: ' num2str(obj.G) ...
', Blue: ' num2str(obj.B)]);
end
end
enumeration
red (1,0,0)
green (0,1,0)
blue (0,0,1)
cyan (0,1,1)
magenta (1,0,1)
yellow (1,1,0)
black (0,0,0)
white (1,1,1)
end
end