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

Incorrect brace syntax highlighting within switch case #52

Closed dklilley closed 2 months ago

dklilley commented 1 year ago

Consider the following code:

switch input
    case 0
        disp foo
    case { 1,2}
        disp bar
    case {3,4 }
        disp foobar
    case {5,6}
        disp baz
end

Because of the space after the 4, the tokenization of the {3,4 } is incorrect. This causes the following case to be tokenized incorrectly as well. incorrectSwitchBraceColoring