-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix anonymous functions as arguments
- Loading branch information
1 parent
ba83c5e
commit 467e6ff
Showing
5 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/51" | ||
|
||
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 |