diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-02-15 05:10:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-15 05:10:43 -0500 |
| commit | 0d408d5fe5bae38f6463e78486eab4263d4ae40d (patch) | |
| tree | 9c925fe79dcde0308de39f153c78ed34b2b9bd7f /rust-mode-tests.el | |
| parent | b911835c8e431ec1523e71b73ffd82cd6b80157c (diff) | |
| parent | 705f3e40a818d6b293c2460a7e6e2985c400a654 (diff) | |
| download | rust-mode-0d408d5fe5bae38f6463e78486eab4263d4ae40d.tar.gz | |
Merge pull request #253 from jjwest/master
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 6c6e9af..fd29d5d 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -2193,6 +2193,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 */ }" |
