Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
<key>begin</key>
<string>(?&lt;=\))[^\S\n]*(\()?</string>
<key>end</key>
<string>(\))?[^\S\n]*(?=;|(?&lt;!(?:\.{3}.*))\n|%)</string>
<string>(\))?[^\S\n]*(?=;|,|(?&lt;!(?:\.{3}.*))\n|%)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
Expand Down Expand Up @@ -262,7 +262,7 @@
</dict>
</array>
<key>end</key>
<string>(?=;|(?&lt;!(?:\.{3}.*))\n|%)</string>
<string>(?=;|,|(?&lt;!(?:\.{3}.*))\n|%)</string>
</dict>
<key>blocks</key>
<dict>
Expand Down
2 changes: 1 addition & 1 deletion test/t54LineContinuationInAnonymousFunctions.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% SYNTAX TEST "source.matlab" "Imports: https://github.com/mathworks/MATLAB-Language-grammar/pull/52"
% SYNTAX TEST "source.matlab" "LineContinationInAnonymousFunctions: https://github.com/mathworks/MATLAB-Language-grammar/pull/54"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making these corrections!



@(x, y) x.^2+y;
Expand Down
2 changes: 1 addition & 1 deletion test/t57Operators.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% SYNTAX TEST "source.matlab" "Imports: https://github.com/mathworks/MATLAB-Language-grammar/pull/57"
% SYNTAX TEST "source.matlab" "Operators: https://github.com/mathworks/MATLAB-Language-grammar/pull/57"

%% Assignment and metadata query

Expand Down
2 changes: 1 addition & 1 deletion test/t61ReadWriteOperations.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% SYNTAX TEST "source.matlab" "Imports: https://github.com/mathworks/MATLAB-Language-grammar/pull/51"
% SYNTAX TEST "source.matlab" "ReadWriteOperations: https://github.com/mathworks/MATLAB-Language-grammar/pull/61"

variable
% <------- variable.other.readwrite.matlab
Expand Down
23 changes: 23 additions & 0 deletions test/t80AnonymousFunctionArgument.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
% SYNTAX TEST "source.matlab" "AnonymousFunctionArgument: https://github.com/mathworks/MATLAB-Language-grammar/pull/80"

q = integral(@(x) x.^2, 0, 1);
% ^^^^^^^^^ meta.function.anonymous.matlab
% ^ - meta.function.anonymous.matlab


if ~isempty(lstr)
p.DataTipTemplate.DataTipRows(end+1) = ...
dataTipTextRow('cBin', arrayfun(@(x) lstr, binsX, 'UniformOutput', false));
% ^^^^^^^^^ meta.function.anonymous.matlab
% ^ - meta.function.anonymous.matlab
end
% <-- meta.if.matlab keyword.control.end.if.matlab


if ~isempty(lstr)
p.DataTipTemplate.DataTipRows(end+1) = ...
dataTipTextRow('cBin', arrayfun(@(x) lstr, binsX, 'UniformOutput', false));
% ^^^^^^^^^ meta.function.anonymous.matlab
% ^ - meta.function.anonymous.matlab
end
% <-- meta.if.matlab keyword.control.end.if.matlab