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(
7676) -> InFile < SyntaxToken > {
7777 let src = InFile :: new ( file_id. into ( ) , token) ;
7878
79+ let source_analyzer =
80+ hir:: SourceAnalyzer :: new ( db, src. with_value ( src. value . parent ( ) ) . as_ref ( ) , None ) ;
81+
7982 successors ( Some ( src) , |token| {
8083 let macro_call = token. value . ancestors ( ) . find_map ( ast:: MacroCall :: cast) ?;
8184 let tt = macro_call. token_tree ( ) ?;
8285 if !token. value . text_range ( ) . is_subrange ( & tt. syntax ( ) . text_range ( ) ) {
8386 return None ;
8487 }
85- let source_analyzer =
86- hir:: SourceAnalyzer :: new ( db, token. with_value ( token. value . parent ( ) ) . as_ref ( ) , None ) ;
8788 let exp = source_analyzer. expand ( db, token. with_value ( & macro_call) ) ?;
8889 exp. map_token_down ( db, token. as_ref ( ) )
8990 } )
You can’t perform that action at this time.
0 commit comments