internal MetaObject /*!*/ CreateMetaObject(MetaObjectBinder /*!*/ action, MetaObject /*!*/[] /*!*/ siteArgs)
{
var expr = _error ? Ast.Throw(_result) : _result;
Restrictions restrictions;
if (_condition != null)
{
var deferral = action.Defer(siteArgs);
expr = Ast.Condition(_condition, AstUtils.Convert(expr, typeof(object)), deferral.Expression);
restrictions = deferral.Restrictions;
}
else
{
restrictions = Restrictions.Empty;
}
if (_temps != null)
{
expr = Ast.Block(_temps, expr);
}
if (_restriction != null)
{
restrictions = restrictions.Merge(Restrictions.GetExpressionRestriction(_restriction));
}
return(new MetaObject(expr, restrictions));
}