Better API for Scope.

This commit is contained in:
Stephen Chung
2020-03-03 15:20:20 +08:00
parent fa13588f69
commit a1591ae45b
7 changed files with 184 additions and 50 deletions

View File

@@ -174,11 +174,6 @@ impl Engine {
self.register_fn("+", concat);
self.register_fn("==", unit_eq);
// self.register_fn("[]", idx);
// FIXME? Registering array lookups are a special case because we want to return boxes
// directly let ent = self.fns.entry("[]".to_string()).or_insert_with(Vec::new);
// (*ent).push(FnType::ExternalFn2(Box::new(idx)));
// Register conversion functions
self.register_fn("to_float", |x: i8| x as f64);
self.register_fn("to_float", |x: u8| x as f64);