feat: 添加标准测试
This commit is contained in:
@@ -25,4 +25,6 @@ pub fn register_all(env: &Rc<RefCell<Env>>) {
|
||||
let mut os = HashMap::new();
|
||||
os.insert("clock".into(), Value::NativeFunction(os::clock));
|
||||
e.define("os".into(), Value::Object(Rc::new(RefCell::new(os))));
|
||||
// clock can also be used as a global function for convenience
|
||||
e.define("clock".into(), Value::NativeFunction(os::clock));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user