mathworks / mathworks/MATLAB-Language-grammar
Parenthesis not tokenized correctly when there is space preceding it
Nobody has claimed this yet.
- Dominant language
- MATLAB
- Stars
- 64
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
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)
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- matlab
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100