feat: 添加数组和字符串的属性与方法支持,包括 length、push、pop、upper、lower、trim、contains、starts_with、ends_with、substring、replace 和 split
This commit is contained in:
@@ -12,7 +12,7 @@ use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
use std::fmt;
|
||||
|
||||
pub type NativeFn = fn(Vec<Value>) -> Result<Value, crate::error::RuntimeError>;
|
||||
pub type NativeFn = Rc<dyn Fn(Vec<Value>) -> Result<Value, crate::error::RuntimeError>>;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum Value {
|
||||
|
||||
Reference in New Issue
Block a user