diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 8ecaff204..527888306 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -74,7 +74,7 @@ pub(crate) fn highlight( | |||
74 | 74 | ||
75 | let mut current_macro_call: Option<ast::MacroCall> = None; | 75 | let mut current_macro_call: Option<ast::MacroCall> = None; |
76 | let mut format_string_highlighter = FormatStringHighlighter::default(); | 76 | let mut format_string_highlighter = FormatStringHighlighter::default(); |
77 | let mut macro_rules_highlighter = MacroRulesHighlighter::new(); | 77 | let mut macro_rules_highlighter = MacroRulesHighlighter::default(); |
78 | 78 | ||
79 | // Walk all nodes, keeping track of whether we are inside a macro or not. | 79 | // Walk all nodes, keeping track of whether we are inside a macro or not. |
80 | // If in macro, expand it first and highlight the expanded code. | 80 | // If in macro, expand it first and highlight the expanded code. |
@@ -125,8 +125,8 @@ pub(crate) fn highlight( | |||
125 | WalkEvent::Leave(Some(mc)) => { | 125 | WalkEvent::Leave(Some(mc)) => { |
126 | assert!(current_macro_call == Some(mc)); | 126 | assert!(current_macro_call == Some(mc)); |
127 | current_macro_call = None; | 127 | current_macro_call = None; |
128 | format_string_highlighter.reset(); | 128 | format_string_highlighter = FormatStringHighlighter::default(); |
129 | macro_rules_highlighter.reset(); | 129 | macro_rules_highlighter = MacroRulesHighlighter::default(); |
130 | } | 130 | } |
131 | _ => (), | 131 | _ => (), |
132 | } | 132 | } |