emacs-matlab/tests/mpclass.m
Eric Ludlam 21402281fd matlab.el: Improve block comment handling.
(matlab-font-lock-extend-region): is now added to font-lok-extend-region-functions
and handles block comment bounds.
(matlab-ltype-block-comm): now returns the bounds of the block comment
the cursor is in.  (It had to find them anyway, so now it returns them.)
(matlab-show-paren-or-block): Now does nothing if in a block comment.
(matlab-mode-vf-block-matches-forward): Also ignores hits in block comments.
tests/mpclass.m: Minor tweaks from testing.
2019-11-09 19:23:02 -05:00

61 lines
1.3 KiB
Matlab

classdef (abstract) mpclass < handle & matlab.mixin.SetGetExactNames
properties
X
Y
end
properties (Access='private')
A
B
end
methods
function obj = mpclass(x, y)
% Parsetest constructor
obj.X = x;
obj.Y = y;
end
end
methods (Access='protected')
function do_thing(obj, a, b)
% Do a thing for the parse test
obj.A = a;
obj.B = b;
localfunc('hello');
end
end
end
function localfunc(T)
% Local functions are handy.
disp(T);
end
%% >> SEMANTIC TEST EXPECTED OUTPUT
%{
(( "mpclass" type
( :type "class"
:superclasses ("handle" "matlab.mixin.SetGetExactNames")
:members (
("X" variable)
("Y" variable)
("A" variable (:protection "private"))
("B" variable (:protection "private"))
("mpclass" function (
:return ("obj")
:arguments ("x" "y")))
("do_thing" function (
:protection "protected"
:arguments ("obj" "a" "b"))))))
("localfunc" function (
:arguments ("T"))))
%}
%% End