diff options
Diffstat (limited to 'crates/ra_ide/src/snapshots/highlighting.html')
-rw-r--r-- | crates/ra_ide/src/snapshots/highlighting.html | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html index 51851763e..8c372ad27 100644 --- a/crates/ra_ide/src/snapshots/highlighting.html +++ b/crates/ra_ide/src/snapshots/highlighting.html | |||
@@ -3,70 +3,72 @@ | |||
3 | body { margin: 0; } | 3 | body { margin: 0; } |
4 | pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; } | 4 | pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; } |
5 | 5 | ||
6 | |||
6 | .comment { color: #7F9F7F; } | 7 | .comment { color: #7F9F7F; } |
7 | .string { color: #CC9393; } | 8 | .struct, .enum { color: #7CB8BB; } |
9 | .enum_variant { color: #BDE0F3; } | ||
10 | .string_literal { color: #CC9393; } | ||
8 | .field { color: #94BFF3; } | 11 | .field { color: #94BFF3; } |
9 | .function { color: #93E0E3; } | 12 | .function { color: #93E0E3; } |
10 | .parameter { color: #94BFF3; } | 13 | .parameter { color: #94BFF3; } |
11 | .text { color: #DCDCCC; } | 14 | .text { color: #DCDCCC; } |
12 | .type { color: #7CB8BB; } | 15 | .type { color: #7CB8BB; } |
13 | .type.builtin { color: #8CD0D3; } | 16 | .builtin_type { color: #8CD0D3; } |
14 | .type.param { color: #20999D; } | 17 | .type_param { color: #DFAF8F; } |
15 | .attribute { color: #94BFF3; } | 18 | .attribute { color: #94BFF3; } |
16 | .literal { color: #BFEBBF; } | 19 | .numeric_literal { color: #BFEBBF; } |
17 | .literal.numeric { color: #6A8759; } | ||
18 | .macro { color: #94BFF3; } | 20 | .macro { color: #94BFF3; } |
19 | .module { color: #AFD8AF; } | 21 | .module { color: #AFD8AF; } |
20 | .variable { color: #DCDCCC; } | 22 | .variable { color: #DCDCCC; } |
21 | .variable.mut { color: #DCDCCC; text-decoration: underline; } | 23 | .mutable { text-decoration: underline; } |
22 | 24 | ||
23 | .keyword { color: #F0DFAF; } | 25 | .keyword { color: #F0DFAF; font-weight: bold; } |
24 | .keyword.unsafe { color: #DFAF8F; } | 26 | .keyword.unsafe { color: #BC8383; font-weight: bold; } |
25 | .keyword.control { color: #F0DFAF; font-weight: bold; } | 27 | .control { font-style: italic; } |
26 | </style> | 28 | </style> |
27 | <pre><code><span class="attribute">#</span><span class="attribute">[</span><span class="attribute">derive</span><span class="attribute">(</span><span class="attribute">Clone</span><span class="attribute">,</span><span class="attribute"> </span><span class="attribute">Debug</span><span class="attribute">)</span><span class="attribute">]</span> | 29 | <pre><code><span class="attribute">#</span><span class="attribute">[</span><span class="attribute">derive</span><span class="attribute">(</span><span class="attribute">Clone</span><span class="attribute">,</span><span class="attribute"> </span><span class="attribute">Debug</span><span class="attribute">)</span><span class="attribute">]</span> |
28 | <span class="keyword">struct</span> <span class="type">Foo</span> { | 30 | <span class="keyword">struct</span> <span class="struct">Foo</span> { |
29 | <span class="keyword">pub</span> <span class="field">x</span>: <span class="type builtin">i32</span>, | 31 | <span class="keyword">pub</span> <span class="field">x</span>: <span class="builtin_type">i32</span>, |
30 | <span class="keyword">pub</span> <span class="field">y</span>: <span class="type builtin">i32</span>, | 32 | <span class="keyword">pub</span> <span class="field">y</span>: <span class="builtin_type">i32</span>, |
31 | } | 33 | } |
32 | 34 | ||
33 | <span class="keyword">fn</span> <span class="function">foo</span><<span class="type param">T</span>>() -> <span class="type param">T</span> { | 35 | <span class="keyword">fn</span> <span class="function">foo</span><<span class="type_param">T</span>>() -> <span class="type_param">T</span> { |
34 | <span class="macro">unimplemented</span><span class="macro">!</span>(); | 36 | <span class="macro">unimplemented</span><span class="macro">!</span>(); |
35 | <span class="function">foo</span>::<<span class="type builtin">i32</span>>(); | 37 | <span class="function">foo</span>::<<span class="builtin_type">i32</span>>(); |
36 | } | 38 | } |
37 | 39 | ||
38 | <span class="macro">macro_rules</span><span class="macro">!</span> def_fn { | 40 | <span class="macro">macro_rules</span><span class="macro">!</span> def_fn { |
39 | ($($tt:tt)*) => {$($tt)*} | 41 | ($($tt:tt)*) => {$($tt)*} |
40 | } | 42 | } |
41 | 43 | ||
42 | <span class="macro">def_fn</span><span class="macro">!</span>{ | 44 | <span class="macro">def_fn</span><span class="macro">!</span> { |
43 | <span class="keyword">fn</span> <span class="function">bar</span>() -> <span class="type builtin">u32</span> { | 45 | <span class="keyword">fn</span> <span class="function">bar</span>() -> <span class="builtin_type">u32</span> { |
44 | <span class="literal numeric">100</span> | 46 | <span class="numeric_literal">100</span> |
45 | } | 47 | } |
46 | } | 48 | } |
47 | 49 | ||
48 | <span class="comment">// comment</span> | 50 | <span class="comment">// comment</span> |
49 | <span class="keyword">fn</span> <span class="function">main</span>() { | 51 | <span class="keyword">fn</span> <span class="function">main</span>() { |
50 | <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal numeric">92</span>); | 52 | <span class="macro">println</span><span class="macro">!</span>(<span class="string_literal">"Hello, {}!"</span>, <span class="numeric_literal">92</span>); |
51 | 53 | ||
52 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable mutable">vec</span> = Vec::new(); | 54 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable mutable">vec</span> = Vec::new(); |
53 | <span class="keyword control">if</span> <span class="keyword">true</span> { | 55 | <span class="keyword control">if</span> <span class="keyword">true</span> { |
54 | <span class="keyword">let</span> <span class="variable">x</span> = <span class="literal numeric">92</span>; | 56 | <span class="keyword">let</span> <span class="variable">x</span> = <span class="numeric_literal">92</span>; |
55 | <span class="variable mutable">vec</span>.push(<span class="type">Foo</span> { <span class="field">x</span>, <span class="field">y</span>: <span class="literal numeric">1</span> }); | 57 | <span class="variable mutable">vec</span>.push(<span class="struct">Foo</span> { <span class="field">x</span>, <span class="field">y</span>: <span class="numeric_literal">1</span> }); |
56 | } | 58 | } |
57 | <span class="keyword unsafe">unsafe</span> { <span class="variable mutable">vec</span>.set_len(<span class="literal numeric">0</span>); } | 59 | <span class="keyword unsafe">unsafe</span> { <span class="variable mutable">vec</span>.set_len(<span class="numeric_literal">0</span>); } |
58 | 60 | ||
59 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable mutable">x</span> = <span class="literal numeric">42</span>; | 61 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable mutable">x</span> = <span class="numeric_literal">42</span>; |
60 | <span class="keyword">let</span> <span class="variable mutable">y</span> = &<span class="keyword">mut</span> <span class="variable mutable">x</span>; | 62 | <span class="keyword">let</span> <span class="variable mutable">y</span> = &<span class="keyword">mut</span> <span class="variable mutable">x</span>; |
61 | <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable mutable">y</span>; | 63 | <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable mutable">y</span>; |
62 | 64 | ||
63 | <span class="variable mutable">y</span>; | 65 | <span class="variable mutable">y</span>; |
64 | } | 66 | } |
65 | 67 | ||
66 | <span class="keyword">enum</span> <span class="type">E</span><<span class="type param">X</span>> { | 68 | <span class="keyword">enum</span> <span class="enum">E</span><<span class="type_param">X</span>> { |
67 | <span class="constant">V</span>(<span class="type param">X</span>) | 69 | <span class="enum_variant">V</span>(<span class="type_param">X</span>) |
68 | } | 70 | } |
69 | 71 | ||
70 | <span class="keyword">impl</span><<span class="type param">X</span>> <span class="type">E</span><<span class="type param">X</span>> { | 72 | <span class="keyword">impl</span><<span class="type_param">X</span>> <span class="enum">E</span><<span class="type_param">X</span>> { |
71 | <span class="keyword">fn</span> <span class="function">new</span><<span class="type param">T</span>>() -> <span class="type">E</span><<span class="type param">T</span>> {} | 73 | <span class="keyword">fn</span> <span class="function">new</span><<span class="type_param">T</span>>() -> <span class="enum">E</span><<span class="type_param">T</span>> {} |
72 | }</code></pre> \ No newline at end of file | 74 | }</code></pre> \ No newline at end of file |