branch: externals/matlab-mode
commit 7ca68ae615d5770844df56c17d728db0c7cc04f4
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>
matlab-ts-mode: validate enum's faces in presence of non-empty blank line
---
matlab-ts-mode.el | 9 ---------
.../font_lock_enum_with_blank_non_empty_line.m | 10 ++++++++++
.../font_lock_enum_with_blank_non_empty_line_expected.txt | 10 ++++++++++
3 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/matlab-ts-mode.el b/matlab-ts-mode.el
index 84684fbc52..c70eb7fad9 100644
--- a/matlab-ts-mode.el
+++ b/matlab-ts-mode.el
@@ -2635,15 +2635,6 @@ is t, add the following to an Init File (e.g.
`user-init-file' or
;; - typing newlines
;; - typing line-by-line
;;
- ;; TODO font-lock
- ;; classdef fooenum
- ;; enumeration
- ;;
- ;; red % parse error when the prior line is a blank line
containing spaces or tabs
- ;; end
- ;; end
- ;; See: https://github.com/acristoffers/tree-sitter-matlab/issues/48
- ;;
;; TODO font-lock when errors
;; can we add light error indicator somewhere, e.g. put an underline
marker on the error
;; region?
diff --git
a/tests/test-matlab-ts-mode-font-lock-files/font_lock_enum_with_blank_non_empty_line.m
b/tests/test-matlab-ts-mode-font-lock-files/font_lock_enum_with_blank_non_empty_line.m
new file mode 100644
index 0000000000..7e936a8d74
--- /dev/null
+++
b/tests/test-matlab-ts-mode-font-lock-files/font_lock_enum_with_blank_non_empty_line.m
@@ -0,0 +1,10 @@
+% -*- matlab-ts -*-
+
+% Note, there should be whitespace on line after the enumeration!
+% See: https://github.com/acristoffers/tree-sitter-matlab/issues/48
+classdef font_lock_enum_with_blank_non_empty_line
+ enumeration
+
+ red % parse error when the prior line is a blank line containing
spaces or tabs
+ end
+end
diff --git
a/tests/test-matlab-ts-mode-font-lock-files/font_lock_enum_with_blank_non_empty_line_expected.txt
b/tests/test-matlab-ts-mode-font-lock-files/font_lock_enum_with_blank_non_empty_line_expected.txt
new file mode 100644
index 0000000000..3fe4458590
--- /dev/null
+++
b/tests/test-matlab-ts-mode-font-lock-files/font_lock_enum_with_blank_non_empty_line_expected.txt
@@ -0,0 +1,10 @@
+c ccc ccccccccc ccc
+
+c ccccc ccccc cccccc cc cccccccccc cc cccc ccccc ccc cccccccccccc
+c cccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+kkkkkkkk ffffffffffffffffffffffffffffffffffffffff
+ kkkkkkkkkkk
+
+ PPP c ccccc ccccc cccc ccc ccccc cccc cc c ccccc cccc cccccccccc
cccccc cc cccc
+ kkk
+kkk