From 705f3e40a818d6b293c2460a7e6e2985c400a654 Mon Sep 17 00:00:00 2001 From: Jonas Westlund Date: Fri, 8 Dec 2017 19:24:51 +0100 Subject: Improved font-locking for print macros --- rust-mode-tests.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'rust-mode-tests.el') diff --git a/rust-mode-tests.el b/rust-mode-tests.el index b2e8338..762c5f8 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -2186,6 +2186,19 @@ fn main() { "\"\"" font-lock-string-face "/* " font-lock-comment-delimiter-face "print!(\"\"); */" font-lock-comment-face)) + ;; with newline directly following delimiter + (rust-test-font-lock + "print!(\n\"\"\n); { /* print!(\"\"); */ }" + '("print!" rust-builtin-formatting-macro-face + "\"\"" font-lock-string-face + "/* " font-lock-comment-delimiter-face + "print!(\"\"); */" font-lock-comment-face)) + ;; with empty println!() + (rust-test-font-lock + "println!(); { /* println!(); */ }" + '("println!" rust-builtin-formatting-macro-face + "/* " font-lock-comment-delimiter-face + "println!(); */" font-lock-comment-face)) ;; other delimiters (rust-test-font-lock "print!{\"\"}; { /* no-op */ }" -- cgit v1.2.3