use super::ast::{Expression, Program}; use internment::ArcIntern; use std::collections::HashSet; impl Program { /// Get the complete list of strings used within the program. /// /// For the purposes of this function, strings are the variables used in /// `print` statements. pub fn strings(&self) -> HashSet> { let mut result = HashSet::new(); for function in self.functions.values() { function.body.register_strings(&mut result); } result } } impl Expression { fn register_strings(&self, _string_set: &mut HashSet>) { // nothing has a string in here, at the moment unimplemented!() } }