From 06f89e5f3a00d91e84963745af989f1e9a906bb4 Mon Sep 17 00:00:00 2001 From: Leander Tentrup Date: Sun, 14 Jun 2020 15:40:06 +0200 Subject: Fix syntax highlighting of recursive macros Add syntax highlighting for the BANG (`!`) token if the parent is `MACRO_CALL`. --- crates/ra_ide/src/syntax_highlighting/tests.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'crates/ra_ide/src/syntax_highlighting') 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! { } } +macro_rules! noop { + ($expr:expr) => { + $expr + } +} + // comment fn main() { println!("Hello, {}!", 92); @@ -61,6 +67,8 @@ fn main() { // Do nothing } + noop!(noop!(1)); + let mut x = 42; let y = &mut x; let z = &y; -- cgit v1.2.3