Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Matlab classes #1791

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

andebjor
Copy link
Contributor

Recognize the definition of a class, and allow for functions not to be
defined in the first column but to be indented by white space.

@coveralls
Copy link

coveralls commented Jul 11, 2018

Coverage Status

Coverage remained the same at 84.409% when pulling 95fafa3 on andebjor:matlab_classes into 5a4b6d0 on universal-ctags:master.

end
end
end

function [x,y,z] = func1
function x = func2
function func3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the test case for testing what you wrote:

and allow for functions not to be
defined in the first column but to be indented by white space.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: I added the two missing function types of this kind as class methods.

@@ -1,3 +1,10 @@
classdef class1 < handle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question. Here "handle" is the super class of "class1"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is correct. The handle class is actually a special class, changing the semantics of the derived class.

Recognize the definition of a class, and allow for functions not to be
defined in the first column but to be indented by white space.
@masatake masatake merged commit 7ac8f77 into universal-ctags:master Jul 11, 2018
@masatake
Copy link
Member

Thank you. BTW, could you help us more to improve matlab parser?
Test cases under Units/review-needed.r were came from Exubertant-ctags.
The cases are not reviewed; pairs of an input file and expected.tags for the input are not verified by ctags developers.

Could you look at matlab_backtracking.m.t/{input.m,expected.tags} and matlab_test.m.t/{input.m,expected.tags} and give me feedback ?

If you say they are o.k., I will move the cases to Unix/parser-matlab.r, a new directory.

@andebjor andebjor deleted the matlab_classes branch July 11, 2018 13:14
@andebjor
Copy link
Contributor Author

See #1792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants