mathworks / mathworks/MATLAB-Language-grammar

Property Access Lists break syntax highlighting

Open
#92 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
MATLAB
Stars
64
Forks
22
PR merge metrics
No merged PRs in 30d

Description

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

  • OS Version: Windows 10
  • VS Code Version: v1.90.1

Additional context
None

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the MATLAB classdef example in the report, comparing Access = ?Test2 with Access = public in the MATLAB grammar's syntax highlighting environment. Trace how the property access list is tokenized, then verify that the qualified access form highlights correctly without changing subsequent blocks.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.