Introduce ActiveParameter

This commit is contained in:
Aleksey Kladov 2020-04-24 01:46:00 +02:00
parent 4b8e9d5483
commit 09a4b78775
5 changed files with 35 additions and 30 deletions

View file

@ -129,21 +129,6 @@ pub struct CallInfo {
pub active_parameter: Option<usize>,
}
impl CallInfo {
pub fn active_parameter_type(&self) -> Option<String> {
if let Some(id) = self.active_parameter {
return self.signature.parameter_types.get(id).map(|param_ty| param_ty.clone());
}
None
}
pub fn active_parameter_name(&self) -> Option<String> {
if let Some(id) = self.active_parameter {
return self.signature.parameter_names.get(id).map(|param_ty| param_ty.clone());
}
None
}
}
/// `AnalysisHost` stores the current state of the world.
#[derive(Debug)]
pub struct AnalysisHost {