Example #1
0
        protected internal override ExpressionSlim VisitGoto(GotoExpressionSlim node)
        {
            Append(node.Kind);
            Append('(');
            VisitLabelTarget(node.Target);
            VisitNonNull(", ", node.Value);
            Append(')');

            return(node);
        }
        /// <summary>
        /// Visits a goto expression slim tree node, produces a goto expression.
        /// </summary>
        /// <param name="node">Node to visit.</param>
        /// <param name="target">Target label.</param>
        /// <param name="value">Value expression.</param>
        /// <returns>The goto expression represented by the expression slim node.</returns>
        protected override Expression MakeGoto(GotoExpressionSlim node, LabelTarget target, Expression value)
        {
            var t = VisitIfNotNull(node.Type, MakeTypeCachedDelegate);

            return(_factory.MakeGoto(node.Kind, target, value, t));
        }
 /// <summary>
 /// Visits an goto expression node.
 /// </summary>
 /// <param name="node">Node to visit.</param>
 /// <returns>Result of visiting the node.</returns>
 protected internal virtual ExpressionSlim VisitGoto(GotoExpressionSlim node)
 {
     return(node.Update(VisitIfNotNull(node.Target, VisitLabelTarget), Visit(node.Value)));
 }