feat: 添加数组和字符串的属性与方法支持,包括 length、push、pop、upper、lower、trim、contains、starts_with、ends_with、substring、replace 和 split

This commit is contained in:
2026-06-17 00:23:43 +08:00
parent 8e49df8062
commit f0bba2f2aa
4 changed files with 333 additions and 21 deletions
+1 -1
View File
@@ -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 {