davidvarga / davidvarga/MBeautifier

Parsing whitespace separated dot operator in a array defintions

Open
#127 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
MATLAB
Stars
519
Forks
80
PR merge metrics
No merged PRs in 30d

Description

```
disp( [ 'Error: ' ME . message ] );
disp( [ 'Error: ' ME .message ] );
disp( [ 'Error: ' ME. message ] );
disp( [ 'Error: ' ME.message ] );
disp( [ 'Error: ', ME . message ] );
disp( [ 'Error: ', ME .message ] );
disp( [ 'Error: ', ME. message ] );
```
should all be parsed the same as
`disp( [ 'Error: ', ME.message ] );`

MBeautifier is erroneously parsing
`disp( [ 'Error: ' ME . message ] );`
like this
`disp( [ 'Error: ', ME, ., message ] );`
which isn't valid Matlab syntax and neither is it in agreement with Matlab parser.

Contributor guide

Open the contributing guide

Research direction

Reproduce the eight whitespace variants from the issue and locate the parser handling dot operators inside array definitions. Done means all variants parse like `ME.message`, without treating the dot or `message` as separate array elements, and the behavior agrees with MATLAB parsing.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.