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
50 stars 17 forks source link

Support arguments block #13

Closed rlivings39 closed 5 years ago

rlivings39 commented 5 years ago

Add support for function argument validation

function [xCell,yCell,optionCell] = fRepeat(x,y,option)
    arguments (Repeating)
        x double
        y double
        option {mustBeMember(option,["linear","cubic"])}
    end

    % Function code
    % Return cell arrays
    xCell = x;
    yCell = y;
    optionCell = option;
end
rlivings39 commented 5 years ago

Fixed by #14