aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting/tests.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-15 14:44:46 +0100
committerGitHub <[email protected]>2020-06-15 14:44:46 +0100
commit5b013e5665a34fd757fd6c48dc912606c0915b2c (patch)
tree413f268d2ba637089a84a91740d7599a0b611f49 /crates/ra_ide/src/syntax_highlighting/tests.rs
parentd0ac2f746a7cd2282b2f672cd0a6650a8339b907 (diff)
parent06f89e5f3a00d91e84963745af989f1e9a906bb4 (diff)
Merge #4877
4877: Fix syntax highlighting of recursive macros r=matklad a=ltentrup Add syntax highlighting for the BANG (`!`) token if the parent is `MACRO_CALL`. Before: <img width="514" alt="before" src="https://user-images.githubusercontent.com/201808/84595030-11f65c00-ae56-11ea-9bb2-b1abe2236990.png"> After: <img width="516" alt="recursive-macro" src="https://user-images.githubusercontent.com/201808/84594981-d196de00-ae55-11ea-8636-f877d5d795ff.png"> Fixes #4694. Co-authored-by: Leander Tentrup <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/tests.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tests.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs
index 949bf59a0..070b24f45 100644
--- a/crates/ra_ide/src/syntax_highlighting/tests.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tests.rs
@@ -43,6 +43,12 @@ def_fn! {
43 } 43 }
44} 44}
45 45
46macro_rules! noop {
47 ($expr:expr) => {
48 $expr
49 }
50}
51
46// comment 52// comment
47fn main() { 53fn main() {
48 println!("Hello, {}!", 92); 54 println!("Hello, {}!", 92);
@@ -61,6 +67,8 @@ fn main() {
61 // Do nothing 67 // Do nothing
62 } 68 }
63 69
70 noop!(noop!(1));
71
64 let mut x = 42; 72 let mut x = 42;
65 let y = &mut x; 73 let y = &mut x;
66 let z = &y; 74 let z = &y;