Skip to content

Commit 7de6a0c

Browse files
committed
fix test and allow comments in classdef line
1 parent 5f5c93a commit 7de6a0c

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,14 @@
911911
<string>(?&lt;!\.{3})(?=\n)</string>
912912
<key>patterns</key>
913913
<array>
914+
<dict>
915+
<key>include</key>
916+
<string>#comments</string>
917+
</dict>
918+
<dict>
919+
<key>include</key>
920+
<string>#line_continuation</string>
921+
</dict>
914922
<dict>
915923
<key>comment</key>
916924
<string>Optional inheritance operator</string>
@@ -958,14 +966,6 @@
958966
<key>match</key>
959967
<string>&amp;</string>
960968
</dict>
961-
<dict>
962-
<key>include</key>
963-
<string>#comments</string>
964-
</dict>
965-
<dict>
966-
<key>include</key>
967-
<string>#line_continuation</string>
968-
</dict>
969969
</array>
970970
</dict>
971971
<dict>
@@ -978,6 +978,10 @@
978978
</dict>
979979
</array>
980980
</dict>
981+
<dict>
982+
<key>include</key>
983+
<string>#comments</string>
984+
</dict>
981985
</array>
982986
</dict>
983987
<dict>

test/t87ClassAttributes.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
% SYNTAX TEST "source.matlab" "Property validation: https://github.com/mathworks/MATLAB-Language-grammar/issues/87"
12
classdef (AllowedSubclasses = {?SubClass1,?SubClass2}) SuperClass
23
% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ storage.modifier.section.class.matlab
3-
% ^^^^^^^^^^^^^^^^^^^^^^^ meta.cell.literal.matlab
4+
% ^^^^^^^^^^^^^^^^^^^^^ meta.cell.literal.matlab
45
% ^^^^^^^^^^ entity.name.type.class.matlab
5-
end
6+
end

0 commit comments

Comments
 (0)