From 3c40b15d625df192eb17c34f15f7dbc23f5284b9 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 9 Jun 2021 15:02:11 +0200 Subject: Don't descend MacroCall TokenTree delimiters --- crates/ide/src/syntax_highlighting/test_data/highlighting.html | 5 +++++ crates/ide/src/syntax_highlighting/tests.rs | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'crates/ide') diff --git a/crates/ide/src/syntax_highlighting/test_data/highlighting.html b/crates/ide/src/syntax_highlighting/test_data/highlighting.html index 0264e39a3..a7b5c3b89 100644 --- a/crates/ide/src/syntax_highlighting/test_data/highlighting.html +++ b/crates/ide/src/syntax_highlighting/test_data/highlighting.html @@ -148,6 +148,10 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd } } +macro_rules! dont_color_me_braces { + () => {0} +} + macro_rules! noop { ($expr:expr) => { $expr @@ -171,6 +175,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd // comment fn main() { println!("Hello, {}!", 92); + dont_color_me_braces!(); let mut vec = Vec::new(); if true { diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs index 662b53481..6ad2a362a 100644 --- a/crates/ide/src/syntax_highlighting/tests.rs +++ b/crates/ide/src/syntax_highlighting/tests.rs @@ -122,6 +122,10 @@ def_fn! { } } +macro_rules! dont_color_me_braces { + () => {0} +} + macro_rules! noop { ($expr:expr) => { $expr @@ -145,6 +149,7 @@ macro without_args { // comment fn main() { println!("Hello, {}!", 92); + dont_color_me_braces!(); let mut vec = Vec::new(); if true { -- cgit v1.2.3