mathworks / mathworks/MATLAB-Language-grammar
Variables being tokenized as functions when indexing (i.e. using parens)
Nobody has claimed this yet.
- Dominant language
- MATLAB
- Stars
- 64
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Pretty simple, if you create a variable (var and arr in the video), they are tokenized as variables (both tokens
variable.other.readwrite.matlab, meta.assignment.variable.single.matlab).
If you call a function (mean), it is tokenized as a function call
(entity.name.function.matlab, meta.function-call.parens.matlab).
However, if you index into the array variable from earlier (arr), it is also tokenized like a function call
(entity.name.function.matlab, meta.function-call.parens.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 reported tokenization difference between a function call such as mean(...) and indexing a variable such as arr(...). Then inspect the repository's regular-expression MATLAB grammar to find the rules assigning function-call scopes. Done means indexed variables receive variable/indexing scopes rather than entity.name.function.matlab and meta.function-call.parens.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
- 48/100