File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,15 @@ pub(crate) fn descend_into_macros(
76
76
) -> InFile < SyntaxToken > {
77
77
let src = InFile :: new ( file_id. into ( ) , token) ;
78
78
79
+ let source_analyzer =
80
+ hir:: SourceAnalyzer :: new ( db, src. with_value ( src. value . parent ( ) ) . as_ref ( ) , None ) ;
81
+
79
82
successors ( Some ( src) , |token| {
80
83
let macro_call = token. value . ancestors ( ) . find_map ( ast:: MacroCall :: cast) ?;
81
84
let tt = macro_call. token_tree ( ) ?;
82
85
if !token. value . text_range ( ) . is_subrange ( & tt. syntax ( ) . text_range ( ) ) {
83
86
return None ;
84
87
}
85
- let source_analyzer =
86
- hir:: SourceAnalyzer :: new ( db, token. with_value ( token. value . parent ( ) ) . as_ref ( ) , None ) ;
87
88
let exp = source_analyzer. expand ( db, token. with_value ( & macro_call) ) ?;
88
89
exp. map_token_down ( db, token. as_ref ( ) )
89
90
} )
You can’t perform that action at this time.
0 commit comments