feat: Support for GOTO def from *inside* files included with include! macro

This commit is contained in:
YangzeLuo 2024-01-27 23:36:01 +08:00
parent a911652360
commit b22e772cab
7 changed files with 163 additions and 12 deletions

View file

@ -520,6 +520,24 @@ impl MacroCallLoc {
}
}
}
pub fn include_file_id(
&self,
db: &dyn ExpandDatabase,
macro_call_id: MacroCallId,
) -> Option<FileId> {
if self.def.is_include() {
if let Some(eager) = &self.eager {
if let Ok(it) =
builtin_fn_macro::include_input_to_file_id(db, macro_call_id, &eager.arg)
{
return Some(it);
}
}
}
None
}
}
impl MacroCallKind {