branch: externals/matlab-mode commit 7ba16fdd5188a8c4267f6f092790386d24ea40b1 Author: John Ciolfi <john.ciolfi...@gmail.com> Commit: John Ciolfi <john.ciolfi...@gmail.com>
matlab-ts-mode: add font-lock test for end keyword in context of an error --- .../font_lock_error_issue51_end.m | 9 +++++++++ .../font_lock_error_issue51_end_expected.txt | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/tests/test-matlab-ts-mode-font-lock-files/font_lock_error_issue51_end.m b/tests/test-matlab-ts-mode-font-lock-files/font_lock_error_issue51_end.m new file mode 100644 index 0000000000..bcf5f8c48e --- /dev/null +++ b/tests/test-matlab-ts-mode-font-lock-files/font_lock_error_issue51_end.m @@ -0,0 +1,9 @@ +% -*- matlab-ts -*- + +% See https://github.com/acristoffers/tree-sitter-matlab/issues/51 +% The 'end' should be recognized as a keyword. + +function result = font_lock_error_issue51_end(a, b) + result = 1 + myfcn(a, b) + ... + +end diff --git a/tests/test-matlab-ts-mode-font-lock-files/font_lock_error_issue51_end_expected.txt b/tests/test-matlab-ts-mode-font-lock-files/font_lock_error_issue51_end_expected.txt new file mode 100644 index 0000000000..12a73893be --- /dev/null +++ b/tests/test-matlab-ts-mode-font-lock-files/font_lock_error_issue51_end_expected.txt @@ -0,0 +1,9 @@ +c ccc ccccccccc ccc + +c ccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +c ccc ccccc cccccc cc cccccccccc cc c cccccccc + +kkkkkkkk vvvvvv o fffffffffffffffffffffffffffbvD vb + wwwwww w w w wwwwwwww ww w ccc + +kkk