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

Many issues with multiline function definitions #72

Closed watermarkhu closed 6 months ago

watermarkhu commented 9 months ago

There are currently many errors when function definitions occur on multiple lines.

For example, in an existing testcase, the meta.assignment.variable.output.matlab scope is lost, and is recognized as the entity.name.function.matlab. https://github.com/mathworks/MATLAB-Language-grammar/blob/da0cd40defa79fb9f867d6d0b222091cfdab3869/test/t41FunctionDefinitions.m#L31 image

Also, in this case the input arguments, while colored correctly, are detected as a standard function call, in stead of the meta.parameters.matlab scope. image