private object PerformAssign(object target, Node suffix, object value,
bool staticDotNetAssign)
{
if (staticDotNetAssign)
{
SetStaticProperty((Type)target, suffix.SuffixValue(this), value);
}
else
{
var scope = target as IScope;
if (scope != null)
{
scope.Assign(suffix.SuffixValue(this), value);
}
else if (suffix is IndexSuffix)
{
SetInstanceIndexer(target, suffix.Arguments(this), value);
}
else
{
SetInstanceProperty(target, suffix.SuffixValue(this), value);
}
}
return value;
}