Generic For Loops
This commit is contained in:
@@ -3,7 +3,7 @@ using Upsilon.Text;
|
||||
|
||||
namespace Upsilon.BaseTypes.UserData
|
||||
{
|
||||
internal class GenericUserData : LuaType, IUserData
|
||||
internal class GenericUserData : ScriptType, IUserData
|
||||
{
|
||||
public GenericUserData(object dictionary)
|
||||
{
|
||||
@@ -25,7 +25,7 @@ namespace Upsilon.BaseTypes.UserData
|
||||
return Value.GetType();
|
||||
}
|
||||
|
||||
public virtual LuaType Get(Diagnostics diagnostics, TextSpan span, LuaType index, EvaluationScope scope)
|
||||
public virtual ScriptType Get(Diagnostics diagnostics, TextSpan span, ScriptType index, EvaluationScope scope)
|
||||
{
|
||||
var s = index.ToCSharpObject().ToString();
|
||||
var (type, failed, error) = _typeInfo.Get(Value, s);
|
||||
@@ -36,7 +36,7 @@ namespace Upsilon.BaseTypes.UserData
|
||||
return type;
|
||||
}
|
||||
|
||||
public virtual void Set(Diagnostics diagnostics, TextSpan span, LuaType index, LuaType value)
|
||||
public virtual void Set(Diagnostics diagnostics, TextSpan span, ScriptType index, ScriptType value)
|
||||
{
|
||||
var s = index.ToCSharpObject().ToString();
|
||||
var (failed, error) = _typeInfo.Set(Value, s, value);
|
||||
@@ -46,12 +46,12 @@ namespace Upsilon.BaseTypes.UserData
|
||||
}
|
||||
}
|
||||
|
||||
public (LuaType Type, bool Failed) BinaryOperator(LuaType par1, OperatorType op, LuaType par2)
|
||||
public (ScriptType Type, bool Failed) BinaryOperator(ScriptType par1, OperatorType op, ScriptType par2)
|
||||
{
|
||||
return _typeInfo.BinaryOperator(Value, par1, op, par2);
|
||||
}
|
||||
|
||||
public (LuaType Type, bool Failed) UnaryOperator(LuaType par1, OperatorType op)
|
||||
public (ScriptType Type, bool Failed) UnaryOperator(ScriptType par1, OperatorType op)
|
||||
{
|
||||
return _typeInfo.UnaryOperator(Value, par1, op);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user