mathworks / MATLAB-Language-grammar

This repository contains a regular expression based language grammar for MATLAB to be used by GitHub Linguist for highlighting MATLAB code on GitHub
49 stars 17 forks source link

Property and function validation syntax tokenizes validation functions as keywords #53

Open dklilley opened 1 year ago

dklilley commented 1 year ago

Consider the following example:

classdef Account
    properties
        Balance (1,1) mustBeNumeric
    end
end

In this situation, mustBeNumeric is tokenized as a storage.type, but it would be more accurate to tokenize it the same as a function name.

apozharski commented 1 month ago

Unless I misunderstand the documentation this should be closed as correct behavior as validator functions must be wrapped in curly braces and this is correctly identified as a type (though obviously it is invalid).