diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-28 16:43:11 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-28 16:43:11 +0100 |
commit | bb1d925dab36372c6bd1fb5671bb68ce938ff009 (patch) | |
tree | ad32fbab8caf6563961b1366c726d8323fb303f5 /crates/ide/src/syntax_highlighting/test_data/highlighting.html | |
parent | ce6bb5ccca48b177f6cd12b42b4c52f3e1b44e0c (diff) | |
parent | 772987911851d6480ec8c905c0cac1e2f881152c (diff) |
Merge #8212
8212: Basic support macro 2.0 r=jonas-schievink a=edwin0cheng
Turn out it is quite straight forward :)
r @jonas-schievink
![m2](https://user-images.githubusercontent.com/11014119/112712565-6eb99380-8f0b-11eb-88de-5d7f974dfe6d.png)
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ide/src/syntax_highlighting/test_data/highlighting.html')
-rw-r--r-- | crates/ide/src/syntax_highlighting/test_data/highlighting.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting/test_data/highlighting.html b/crates/ide/src/syntax_highlighting/test_data/highlighting.html index 8b2dd3b70..1eaa7b75b 100644 --- a/crates/ide/src/syntax_highlighting/test_data/highlighting.html +++ b/crates/ide/src/syntax_highlighting/test_data/highlighting.html | |||
@@ -41,7 +41,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
41 | <span class="keyword">mod</span> <span class="module declaration">inner</span> <span class="brace">{</span><span class="brace">}</span> | 41 | <span class="keyword">mod</span> <span class="module declaration">inner</span> <span class="brace">{</span><span class="brace">}</span> |
42 | 42 | ||
43 | <span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="function attribute">rustc_builtin_macro</span><span class="attribute attribute">]</span> | 43 | <span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="function attribute">rustc_builtin_macro</span><span class="attribute attribute">]</span> |
44 | <span class="keyword">macro</span> <span class="unresolved_reference declaration">Copy</span> <span class="brace">{</span><span class="brace">}</span> | 44 | <span class="keyword">macro</span> <span class="macro declaration">Copy</span> <span class="brace">{</span><span class="brace">}</span> |
45 | 45 | ||
46 | <span class="comment">// Needed for function consuming vs normal</span> | 46 | <span class="comment">// Needed for function consuming vs normal</span> |
47 | <span class="keyword">pub</span> <span class="keyword">mod</span> <span class="module declaration">marker</span> <span class="brace">{</span> | 47 | <span class="keyword">pub</span> <span class="keyword">mod</span> <span class="module declaration">marker</span> <span class="brace">{</span> |
@@ -158,6 +158,16 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
158 | <span class="parenthesis">(</span><span class="punctuation">$</span>type<span class="colon">:</span>ty<span class="parenthesis">)</span> <span class="operator">=</span><span class="angle">></span> <span class="parenthesis">(</span><span class="punctuation">$</span>type<span class="parenthesis">)</span> | 158 | <span class="parenthesis">(</span><span class="punctuation">$</span>type<span class="colon">:</span>ty<span class="parenthesis">)</span> <span class="operator">=</span><span class="angle">></span> <span class="parenthesis">(</span><span class="punctuation">$</span>type<span class="parenthesis">)</span> |
159 | <span class="brace">}</span> | 159 | <span class="brace">}</span> |
160 | 160 | ||
161 | <span class="keyword">macro</span> <span class="macro declaration">with_args</span><span class="parenthesis">(</span><span class="punctuation">$</span>i<span class="colon">:</span>ident<span class="parenthesis">)</span> <span class="brace">{</span> | ||
162 | <span class="punctuation">$</span>i | ||
163 | <span class="brace">}</span> | ||
164 | |||
165 | <span class="keyword">macro</span> <span class="macro declaration">without_args</span> <span class="brace">{</span> | ||
166 | <span class="parenthesis">(</span><span class="punctuation">$</span>i<span class="colon">:</span>ident<span class="parenthesis">)</span> <span class="operator">=</span><span class="angle">></span> <span class="brace">{</span> | ||
167 | <span class="punctuation">$</span>i | ||
168 | <span class="brace">}</span> | ||
169 | <span class="brace">}</span> | ||
170 | |||
161 | <span class="comment">// comment</span> | 171 | <span class="comment">// comment</span> |
162 | <span class="keyword">fn</span> <span class="function declaration">main</span><span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="brace">{</span> | 172 | <span class="keyword">fn</span> <span class="function declaration">main</span><span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="brace">{</span> |
163 | <span class="macro">println!</span><span class="parenthesis">(</span><span class="string_literal">"Hello, {}!"</span><span class="comma">,</span> <span class="numeric_literal">92</span><span class="parenthesis">)</span><span class="semicolon">;</span> | 173 | <span class="macro">println!</span><span class="parenthesis">(</span><span class="string_literal">"Hello, {}!"</span><span class="comma">,</span> <span class="numeric_literal">92</span><span class="parenthesis">)</span><span class="semicolon">;</span> |