sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
70 stars 45 forks source link

enumerations and events cause premature end of m-file parsing #79

Closed goszpeti closed 6 years ago

goszpeti commented 6 years ago

If an m-file class contains enumerations and events, the file parsing will end at that declaration. example code:

class myclass

enumeration 
MYENUM
end

function myfunc()
end
end

myfunc() will not be parsed. I already found the culprit for this in mat_types.py at lines 964 and 974 (version 0.34). idx is not increased after exiting the while loop, so the next end will be considered as the class definitions end.

joeced commented 6 years ago

Thanks for the detailed report, it was very easy to find the error.

Fixed in version 0.3.5 (https://github.com/sphinx-contrib/matlabdomain/releases/tag/0.3.5)