mathworks / mathworks/MATLAB-Language-grammar

Function handle accessor not colored after 4 whitespaces, cannot be separated from anonymous function in case of line continuations

Open Beginner friendly
#58 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

There can be an arbitrary number of whitespaces after the function handle.

image

But in the tmLanguage there is a limit on 4 whitespace characters. Also \s includes newlines, which is not allowed.

image

https://github.com/mathworks/MATLAB-Language-grammar/blob/4f1c0c8e8eac1494ee9c2bac18605aca08b08806/Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage#L2491

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

Start at Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage around line 2491 and inspect the function-handle accessor pattern. Reproduce the issue with the linked examples, then verify that arbitrary spaces are highlighted while newlines remain disallowed and line continuations are not mistaken for anonymous functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.