davidvarga / MBeautifier

MBeautifier is a MATLAB source code formatter, beautifier. It can be used directly in the MATLAB Editor and it is configurable.
GNU General Public License v3.0
483 stars 77 forks source link

Parsing whitespace separated dot operator in a array defintions #127

Open mrelg opened 6 months ago

mrelg commented 6 months ago
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.