Make the ctags parser ignore function definitions in Matlab files written
within block comments, like:
```matlab
%{
function y = This(is, not, a, function, definition)
%}
function y = But(this, is)
%{ not a block comment ("%{" needs to be on a line on its own)
function y = And(also, this)
%}
```
Block comments are useful for commenting out entire sections of code which may
include function definitions, specially since they can be nested (which is also
handled appropriately by this PR).
Additionally, this PR allows function declarations to be indented. This is
quite common when defining class methods within a class.
This PR is a continuation of PR #3358, which I understand was ready to merge
but has been sitting there for a while. So by merging this PR you also get
that one. Two for the price of one!
(I didn't make this a separate PR because it touches some of the same lines
#3358 touches, so making it a separate PR would have led to merge conflicts in
the future. Each individual feature is implemented as a separate commit
though.)
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3563
-- Commit Summary --
* ctags: Matlab: function name only, without args
* Modify (fix) test accordingly
* Improve ctags tests for Matlab
* ctags: Matlab: ignore defs within block comments
* ctags: Matlab: ignore leading whitespace
-- File Changes --
M ctags/parsers/geany_matlab.c (52)
M tests/ctags/matlab_backtracking.m.tags (4)
M tests/ctags/matlab_test.m (14)
M tests/ctags/matlab_test.m.tags (18)
-- Patch Links --
https://github.com/geany/geany/pull/3563.patch
https://github.com/geany/geany/pull/3563.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3563
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/[email protected]>