This warning is thrown when parsing a file that has comments isolated from a variable or another comment. The parsing then proceeds to stop.
WARNING: sphinxcontrib-matlabdomain] Expected property in SomeClass - got (Token.Comment, '% Another comment')
This occurs with a classdef that looks like
classdef SomeClass
properties
% some comment
% Another comment
prop
end
end
This still occurs even if there is a property defined above the first comment
classdef SomeClass
properties
top_prop
% some comment
% Another comment
prop
end
end
I suspect this might be occurring because the section in L1125 for long comments terminates after the first break, and its assuming that the next line must be some property name, keyword, or punctuation. Perhaps if it's a comment again, it should discard the prior comment and continue the while loop.
Maybe something like the following may work (L1160 of the same file)? I haven't tested it since I use this inside of a temporary docker.
...
except IndexError:
# EOF reached, quit gracefully
break
# If we encounter a comment again, reparse starting from here
if self.tokens[idx][0] is Token.Comment:
continue
# with "%:" directive trumps docstring after property
if self.tokens[idx][0] is Token.Name:
...
This warning is thrown when parsing a file that has comments isolated from a variable or another comment. The parsing then proceeds to stop.
WARNING: sphinxcontrib-matlabdomain] Expected property in SomeClass - got (Token.Comment, '% Another comment')
This occurs with a classdef that looks like
This still occurs even if there is a property defined above the first comment
I suspect this might be occurring because the section in L1125 for long comments terminates after the first break, and its assuming that the next line must be some property name, keyword, or punctuation. Perhaps if it's a comment again, it should discard the prior comment and
continue
the while loop.Maybe something like the following may work (L1160 of the same file)? I haven't tested it since I use this inside of a temporary docker.