diff options
| author | Jonas Westlund <jonaswestlund101@gmail.com> | 2017-12-08 19:24:51 +0100 |
|---|---|---|
| committer | Jonas Westlund <jonaswestlund101@gmail.com> | 2017-12-08 19:24:51 +0100 |
| commit | 705f3e40a818d6b293c2460a7e6e2985c400a654 (patch) | |
| tree | 93d99d9e2f494fbf672c1a2f516aeb93a8f53bca /rust-mode-tests.el | |
| parent | 6bcb82b4c2dca4fbbc6585635163bcc5020f6096 (diff) | |
| download | rust-mode-705f3e40a818d6b293c2460a7e6e2985c400a654.tar.gz | |
Improved font-locking for print macros
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 13 |
1 files changed, 13 insertions, 0 deletions
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 */ }" |
