classdef (AllowedSubclasses = {?SubClass1,?SubClass2}) SuperClass
end
{'token': 'source.matlab',
'children': [{'token': 'meta.class.matlab',
'begin': [{'token': 'storage.type.class.matlab', 'content': 'classdef'}],
'end': [{'token': 'storage.type.class.end.matlab', 'content': 'end'}],
'children': [{'token': 'meta.class.declaration.matlab',
'children': [{'token': 'punctuation.section.parens.begin.matlab', 'content': '('},
{'token': 'storage.modifier.class.matlab', 'content': 'AllowedSubclasses'},
{'token': 'keyword.operator.assignment.matlab', 'content': '='},
{'token': 'punctuation.separator.modifier.comma.matlab', 'content': ','},
{'token': 'storage.modifier.class.matlab', 'content': 'SubClass2'},
{'token': 'punctuation.section.parens.end.matlab', 'content': ')'},
{'token': 'entity.name.type.class.matlab', 'content': 'SuperClass'}]}]}]}
I started working with textmate-grammar-python for the https://github.com/sphinx-contrib/matlabdomain package. Thanks for starting this work - it's much more structured than the pygments tokens.
Given this MATLAB class definition
is parsed to these tokens with
textmate-grammar-python==0.6.0:As one can see, we are missing:
{/}.SubClass1?in front ofSubClass1andSubClass2.