//比较运算符比较 public virtual bool Less(ScriptValue obj) { throw new ExecutionException($"类型[{ValueTypeName}]不支持 [<] 运算"); }
public virtual void SetValue(string key, ScriptValue value) { throw new ExecutionException($"类型[{ValueTypeName}]不支持设置变量 String : [{key}]"); }
public virtual void SetValue(object key, ScriptValue value) { throw new ExecutionException($"类型[{ValueTypeName}]不支持设置变量 Object : [{key}]"); }
//调用函数 public virtual ScriptValue Call(ScriptValue thisObject, ScriptValue[] parameters, int length) { throw new ExecutionException($"类型[{ValueTypeName}]不支持函数调用"); }
//设置变量 public virtual void SetValueByIndex(int key, ScriptValue value) { throw new ExecutionException($"类型[{ValueTypeName}]不支持获取变量 Index : [{key}]"); }
public override ScriptValue Call(ScriptValue thisObject, ScriptValue[] parameters, int length) { throw new ExecutionException($"Class<{TypeName}>不支持自定义构造"); }
void AddBasicPrototype(ScriptType type, ref ScriptValue typeValue) { typeValue = new ScriptValue(type); Global.SetValue(type.TypeName, typeValue); }
public virtual ScriptValue Multiply(ScriptValue obj) { throw new ExecutionException($"类型[{ValueTypeName}]不支持 [*] 运算"); }
public virtual ScriptValue InclusiveOr(ScriptValue obj) { throw new ExecutionException($"类型[{ValueTypeName}]不支持 [|] 运算"); }
public virtual bool Equals(ScriptValue obj) { return(obj.valueType == ScriptValue.scriptValueType && obj.scriptValue == this); }
public override bool Equals(object obj) { return(Equals(ScriptValue.CreateValue(obj))); }
public ScriptType CreateType(string typeName, ScriptValue parentType) { return(new ScriptType(typeName, parentType)); }
public void SetGlobal(string key, ScriptValue value) { Global.SetValue(key, value); }
//调用无参函数 public ScriptValue Call(ScriptValue thisObject) { return(Call(thisObject, EMPTY, 0)); }
public virtual bool GreaterOrEqual(ScriptValue obj) { throw new ExecutionException($"类型[{ValueTypeName}]不支持 [>=] 运算"); }
public virtual ScriptValue Combine(ScriptValue obj) { throw new ExecutionException($"类型[{ValueTypeName}]不支持 [&] 运算"); }
public ScriptBasicType(string typeName, ScriptValue parentType) : base(typeName, parentType) { }
public virtual ScriptValue Shr(ScriptValue obj) { throw new ExecutionException($"类型[{ValueTypeName}]不支持 [>>] 运算"); }
public abstract ScriptFunction SetBindObject(ScriptValue obj);
void AddPrimitivePrototype(string name, ref ScriptType type, ref ScriptValue typeValue) { type = new ScriptTypePrimitive(name, TypeObjectValue); typeValue = new ScriptValue(type); Global.SetValue(name, typeValue); }