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

Wrong coloring of the last function argument when it is followed by ellipsis #23

Closed vr050714 closed 4 years ago

vr050714 commented 4 years ago

multiline-instruction-coloring

Probably, the same issue concerns arrays declaration as well

multiline-instruction-coloring-2

vr050714 commented 4 years ago

The problem is that it expects comma operator in between variable and ellipsis. Green color on my screenshots corresponds to array of chars, likely.

rlivings39 commented 4 years ago

Looks like the same issue as #18. If you inspect the syntax highlighting info in vscode with Ctrl+Shift+P Developer: Inspect TM Scopes and then move your cursor to the improperly highlighted line you'll see that the grammar is treating this the same way as MATLAB command syntax:

vscodeBadCommand

vr050714 commented 4 years ago

That's interesting. Thanks!

rlivings39 commented 4 years ago

Fixed by #28