File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 25832583 <key >name </key >
25842584 <string >constant.numeric.decimal.matlab </string >
25852585 <key >match </key >
2586- <string >(?< =[\s\+\-\*\/\\=:\[\(\{,^]|^)\d*\.?\d+([eE][+-]?\d)?([0-9&& [^\.]])*(i|j)?\b </string >
2586+ <string >(?< =[\s\+\-\*\/\\=; :\[\(\{,^]|^)\d*\.?\d+([eE][+-]?\d)?([0-9&& [^\.]])*(i|j)?\b </string >
25872587 <key >captures </key >
25882588 <dict >
25892589 <key >3 </key >
27722772 <key >comment </key >
27732773 <string >Handle things like arg = val; nextArg </string >
27742774 <key >match </key >
2775- <string >(=[^;] *) </string >
2775+ <string >(=(?:[^{\[;]+|\[[^\]]*\]|\{[^}]*\}) *) </string >
27762776 <key >captures </key >
27772777 <dict >
27782778 <key >1 </key >
Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ Regular expression based grammar for the MATLAB Language
88This grammar is used by:
99
1010* [ github/linguist] ( https://github.com/github/linguist ) For syntax highlighting of MATLAB files on GitHub
11- * [ Gimly/vscode-matlab ] ( https://github.com/Gimly/vscode-matlab ) For syntax highlighting of MATLAB files in VSCode
11+ * [ mathworks/MATLAB-extension-for-vscode ] ( https://github.com/mathworks/MATLAB-extension-for-vscode ) For syntax highlighting of MATLAB files in VSCode
1212* [ thedavidprice/language-matlab-octave] ( https://github.com/thedavidprice/language-matlab-octave ) For syntax highlighting of MATLAB files in Atom
Original file line number Diff line number Diff line change 55 "testGrammar" : " vscode-tmgrammar-test -s source.matlab -g Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage -t \" ./test/*.m\" " ,
66 "testGrammarSnap" : " vscode-tmgrammar-snap -s source.matlab -g Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage -t \" ./test/snap/*.m\" " ,
77 "testLintXML" : " xmllint --noout \" Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage\" && echo \" xmllint passed on MATLAB.tmLanguage\" " ,
8- "test" : " npm run testLintXML && npm run testGrammar && npm run testGrammarSnap" ,
8+ "test" : " ( npm run testLintXML && npm run testGrammar && npm run testGrammarSnap && echo \" All grammar tests passed \" ) || echo \" Error: One or more tests failed \" " ,
99 "updateGrammarSnap" : " vscode-tmgrammar-snap -s source.matlab -g Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage -t \" ./test/snap/*.m\" -u"
1010 },
1111 "repository" : {
Original file line number Diff line number Diff line change 1+ % SYNTAX TEST "source.matlab" "Array property parsing: https://github.com/mathworks/MATLAB-Language-grammar/issues/101"
2+ classdef Foo
3+ properties
4+ mat1 = [1 1 ; 1 1] ;
5+ % ^ constant.numeric.decimal.matlab
6+ % ^ punctuation.section.brackets.end.matlab
7+ mat2 = [1 ;1];
8+ % ^ constant.numeric.decimal.matlab
9+ % ^ punctuation.section.brackets.end.matlab
10+ arr1 = {1 1 ; 1 1} ;
11+ % ^ constant.numeric.decimal.matlab
12+ % ^ punctuation.section.braces.end.matlab
13+ arr2 = {1 ;1};
14+ % ^ constant.numeric.decimal.matlab
15+ % ^ punctuation.section.braces.end.matlab
16+ end
17+ end
You can’t perform that action at this time.
0 commit comments