diff options
author | Leander Tentrup <[email protected]> | 2020-06-14 14:40:06 +0100 |
---|---|---|
committer | Leander Tentrup <[email protected]> | 2020-06-15 14:03:13 +0100 |
commit | 06f89e5f3a00d91e84963745af989f1e9a906bb4 (patch) | |
tree | 6a3d96f58ff9b99066e5b410911b47ce0b28d529 /crates/ra_ide/src/snapshots/highlighting.html | |
parent | 017331a53c1eeaa1253d2829165627bfa27dc124 (diff) |
Fix syntax highlighting of recursive macros
Add syntax highlighting for the BANG (`!`) token if the parent is `MACRO_CALL`.
Diffstat (limited to 'crates/ra_ide/src/snapshots/highlighting.html')
-rw-r--r-- | crates/ra_ide/src/snapshots/highlighting.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html index 33548d43c..5c2ff6ab5 100644 --- a/crates/ra_ide/src/snapshots/highlighting.html +++ b/crates/ra_ide/src/snapshots/highlighting.html | |||
@@ -62,6 +62,12 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | <span class="macro">macro_rules!</span> <span class="macro declaration">noop</span> { | ||
66 | ($expr:expr) => { | ||
67 | $expr | ||
68 | } | ||
69 | } | ||
70 | |||
65 | <span class="comment">// comment</span> | 71 | <span class="comment">// comment</span> |
66 | <span class="keyword">fn</span> <span class="function declaration">main</span>() { | 72 | <span class="keyword">fn</span> <span class="function declaration">main</span>() { |
67 | <span class="macro">println!</span>(<span class="string_literal">"Hello, {}!"</span>, <span class="numeric_literal">92</span>); | 73 | <span class="macro">println!</span>(<span class="string_literal">"Hello, {}!"</span>, <span class="numeric_literal">92</span>); |
@@ -80,6 +86,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
80 | <span class="comment">// Do nothing</span> | 86 | <span class="comment">// Do nothing</span> |
81 | } | 87 | } |
82 | 88 | ||
89 | <span class="macro">noop!</span>(<span class="macro">noop</span><span class="macro">!</span>(<span class="numeric_literal">1</span>)); | ||
90 | |||
83 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable declaration mutable">x</span> = <span class="numeric_literal">42</span>; | 91 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable declaration mutable">x</span> = <span class="numeric_literal">42</span>; |
84 | <span class="keyword">let</span> <span class="variable declaration mutable">y</span> = &<span class="keyword">mut</span> <span class="variable mutable">x</span>; | 92 | <span class="keyword">let</span> <span class="variable declaration mutable">y</span> = &<span class="keyword">mut</span> <span class="variable mutable">x</span>; |
85 | <span class="keyword">let</span> <span class="variable declaration">z</span> = &<span class="variable mutable">y</span>; | 93 | <span class="keyword">let</span> <span class="variable declaration">z</span> = &<span class="variable mutable">y</span>; |