davidvarga / davidvarga/MBeautifier
Parsing whitespace separated dot operator in a array defintions
- 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
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