Added sum function to symbol_table::contains_fn

This commit is contained in:
PaddiM8 2020-12-13 23:47:44 +01:00
parent fd29599e31
commit 7c05d1ab22

View File

@ -74,7 +74,9 @@ impl SymbolTable {
}
pub fn contains_fn(&self, identifier: &str) -> bool {
prelude::UNARY_FUNCS.contains_key(identifier)
identifier == "sum"
|| identifier == "Σ"
|| prelude::UNARY_FUNCS.contains_key(identifier)
|| prelude::BINARY_FUNCS.contains_key(identifier)
|| self.hashmap.contains_key(&format!("fn.{}", identifier))
}