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 Access Lists break syntax highlighting #92

Open albheim opened 3 weeks ago

albheim commented 3 weeks ago

Describe the bug Upon upgrading to v1.2.5 of the matlab extension the syntax highlighting seems to break on ?ClassName in a property access list like

classdef Test
    properties (Access = public)
        A = 3
    end
    properties (Access = ?Test2) % This becomes white and following blocks are also different compared to if I set e.g. public.
        B = 3
    end
    properties (Access = public)
        C = 3
    end
end

To Reproduce

  1. Install v1.2.5
  2. Paste above code in a file

Expected behavior Correct highlighting, i.e. the one that is there if we use public instead of ?Test2 in above example.

Screenshots image

Useful Information

Additional context None

dklilley commented 3 weeks ago

Thanks for reporting this! This behavior stems from the MATLAB language grammar, so I am moving this issue over to that repository.