134800317a
(matlab-lattr-block-close): After narrowing buffer, got to eol, not max - as we had to expand the narrowed region to handle special syntax chars on eol. metest.el: (metest-all-syntax-tests): Add ... (metest-end-detect-test): New test (met-end-dect-files): New Var (metest-comment-string-syntax-test) (metest-sexp-counting-test, metest-sexp-traversal-test) (metest-indents-test, metest-parse-test): Use new `metest-find-file' for loading in files. (met-indents-files): Add mfuncends.m tests/empty.m: tests/mfuncends.m: tests/mfuncnoend.m: New test files tests/stringtest.m: tests/mclass.m: Add end-detect expected value cookies.
115 lines
No EOL
2.4 KiB
Matlab
115 lines
No EOL
2.4 KiB
Matlab
% >>1
|
|
classdef (abstract) mclass < handle & matlab.mixin.SetGetExactNames % #7#
|
|
% !!0
|
|
% %%% class class
|
|
|
|
% >>11
|
|
properties (Access='public') % #2#
|
|
|
|
% !!8
|
|
AP = []; % #2#
|
|
AB = 'charvec with space'; % #2#
|
|
AC = "string with space and ( "; % #2#
|
|
AD = fun_call(1,2); % #3#
|
|
AE (1,:) double {mustBePositive} = 1; % #5#
|
|
end % <<11
|
|
|
|
% >> 111
|
|
properties (AbortSet=true, NonCopyable=true) % #2#
|
|
|
|
% !!8
|
|
AF (1,1) char {mustBeMember(AF, {'High','Medium','Low'})} = 'Low'; % #5#
|
|
AG (1,1) matlab.lang.OnOffSwitchState = 'on'; % #6#
|
|
end % <<111
|
|
|
|
% >> 112
|
|
events
|
|
% !!8
|
|
Event1
|
|
Event2
|
|
end % <<112
|
|
|
|
% >>12
|
|
methods
|
|
% !!8
|
|
|
|
% >>16
|
|
function obj = mclass()
|
|
% !!8
|
|
|
|
obj.AB = obj.AP(1:end);
|
|
% !!12
|
|
|
|
disp('charvect with if and for words [ in it'); % #2#
|
|
|
|
% !!12
|
|
|
|
notify(obj,'Event1',...
|
|
'indent test');
|
|
|
|
% >>17
|
|
while obj.AB % #3#
|
|
|
|
disp("while loop going on here ("); % #2#
|
|
% !!52
|
|
|
|
% !!16
|
|
|
|
end % <<17
|
|
|
|
error('function mclass in charvec }'); % #2#
|
|
|
|
% !!12
|
|
|
|
end % <<16
|
|
end % <<12
|
|
|
|
methods (Access='public')
|
|
% >>13
|
|
function meth(obj) % #3#
|
|
|
|
% >>14
|
|
if obj.AP % #3#
|
|
|
|
disp('display the word end here'); % #2#
|
|
|
|
else
|
|
|
|
% >>15
|
|
try
|
|
|
|
% comment with if, while, parfor words in it.
|
|
|
|
catch
|
|
|
|
% comment with end in it.
|
|
|
|
end % <<15
|
|
end % <<14
|
|
|
|
end % <<13
|
|
|
|
end % <<12
|
|
|
|
methods (Abstract, Hidden=true) % #2#
|
|
|
|
result = abs_func(a,b) % #3#
|
|
|
|
result = other_abs_fun(a,b) % #3#
|
|
|
|
end
|
|
|
|
methods %!!4
|
|
|
|
function end_separate_line(~) %!!8
|
|
end %!!8
|
|
|
|
function end_same_line(~), end %!!8
|
|
|
|
function after_end_same_line(~), end %!!8
|
|
|
|
end %!!4
|
|
|
|
end % <<1
|
|
|
|
% End |