Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Parenthesis not tokenized correctly when there is space preceding it

Open
#77 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the two parenthesis-highlighting examples from the issue and inspect the grammar rules that tokenize MATLAB function-call punctuation. Compare the tokens for the examples with and without a space before the closing parenthesis; done means both cases produce punctuation.section.group.end.matlab rather than string.unquoted.matlab and meta.function-call.command.matlab.

Written by the indexing model from the issue text.

Description

When there is a space before the last parenthesis, it is not identified to be the closing paren of the cellfun() function, shown below.
The top two lines have the parens colored yellow (correct), while the bottom two lines show the red/yellow mismatch (incorrect)

Screenshot 2024-03-05 at 12 26 34 PM (3)

The top two have the token
punctuation.section.group.end.matlab

The bottom two dont have that token, but instead have
string.unquoted.matlab
meta.function-call.command.matlab

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

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from mathworks/MATLAB-Language-grammar

All issues in mathworks/MATLAB-Language-grammar

Similar issues

More MATLAB issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.