Example #1
0
        private static UnifiedExpression CreateYield(XElement node)
        {
            Contract.Requires(node != null);
            Contract.Requires(node.Name() == "yield");
            var args = node.Elements()
                       .Select(CreateExpresion)
                       .ToTupleLiteral();

            return(UnifiedYieldReturn.Create(args));
        }
Example #2
0
        public UnifiedElement VisitYieldReturnStatement(YieldReturnStatement stmt, object data)
        {
            var value = stmt.Expression.TryAcceptForExpression(this);

            return(UnifiedYieldReturn.Create(value));
        }